tia_kamakshi
asked on
Adding dynamic controls in html table after certain <tr>
Hi,
I am working on ASP.net 2.0 application using C#
I need to create dynamic control in my html table
But the problem is I need to add more <tr> after <tr> having id "dynRow"
and then adding controls to it.
Please advise how to find <tr> from table and add further dynamic <tr> after it by adding controls.
Regards,
I am working on ASP.net 2.0 application using C#
I need to create dynamic control in my html table
<table width="90%" id="tblForm" runat="server">
<tr id="dynRow" runat="server">
<td id="dynTD" runat="server">
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>hgf
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblText" runat="server" Text="Click button for the text"></asp:Label></td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit" /></td>
<td>
</td>
<td>
</td>
</tr>
</table>
I am able to create dynamic control as below:TextBox txtBox = new TextBox();
txtBox.ID = "txtBox1";
txtBox.Visible = true;
dynTD.Controls.Add(txtBox);
But the problem is I need to add more <tr> after <tr> having id "dynRow"
and then adding controls to it.
Please advise how to find <tr> from table and add further dynamic <tr> after it by adding controls.
Regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.