how to display dynamic table in body

Posted by Klbaiju under ASP.NET on 4/17/2013 | Points: 10 | Views : 961 | Status : [Member] | Replies : 2
Hi,
I want to display dynamic table inside body.
this is my code
Response.Write("<div style=' top:200px;left:200px;'>");
Response.Write("<table cellspacing='0' border='1' rules='All' >");
Response.Write("<tr ><td>ID1</td><td>Fname</td><td>Lname</td></tr>");
Response.Write("<tr ><td>100</td><td>Arun</td><td>Kumar</td></tr>");
Response.Write("</table>");
Response.Write("<div>");
problem is it is displaying out side of body.

how to solve this.
Regards
Baiju




Responses

Posted by: Hi.Sethu on: 4/17/2013 [Member] Starter | Points: 25

Up
0
Down
By using ContentPlaceHolder, it is possible to display a HTML content in any place on the page. Follow the below simple steps:
1. Drag a ContentPlaceHolder control and place it to the required place on the page
2. Assign the table to the ContentPlaceHolder control.
OR
1. Create a System.Web.UI.Table with in the ContentPlaceHolder.
2. Generate rows dynomically by using the command <TableID>.Rows.Add

Sethumadhavan R
[sethu_vb@hotmail.com]

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

Posted by: Annaharris on: 4/18/2013 [Member] Starter | Points: 25

Up
0
Down
Try with this code. It may be help you. .Aspx <asp:Literal ID="Literal1" runat="server"></asp:Literal>

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

Login to post response