Polutating back end data as rich text

Posted by Dipu710646 under C# on 4/27/2011 | Points: 10 | Views : 1437 | Status : [Member] | Replies : 1
I has some data in db as follows:

<table><tr><td>This is column1</td></tr><tr><td>This is column2</td></tr></table>

I want to get it populated as a table.

Is there anyway to do that?

Any response is appropriated.

Thanks,
Dipankar




Responses

Posted by: SheoNarayan on: 4/27/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
What problem you are facing? Retrieve from the database and write on the page.

For example, on the .aspx page write

<asp:Literal runat="Server" id="litData" />


In the code behind
DataTable table = MyBAL.Load(); // assuming you are loading data from Business access layer

litData.Text = table.Rows[0]["MyData"].ToString();


In the above code snippet, I am assuming that the MyData column of the first row has your "<table> ...." data.

This should give you the tabular layout on the page.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Dipu710646, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response