system.web.ui.webcontrols

Add row dynamically to table in ASP.NET?

狂风中的少年 提交于 2019-12-31 03:36:06
问题 I'm trying to add rows dynamically to a System.Web.UI.WebControls.Table control in ASP.NET. I found some sample code that does what I'm seeking, but it only adds a single row. It seems like the table row count does not carry from one page load to the next. The user should be able to add as many rows as desired, and I need to capture the data from each row. What am I missing? Code below. <%@ Page Language="VB" %> <script runat="server"> Sub btnAddEmail_Click(ByVal Sender As Object, ByVal e As

Add row dynamically to table in ASP.NET?

爱⌒轻易说出口 提交于 2019-12-02 01:37:04
I'm trying to add rows dynamically to a System.Web.UI.WebControls.Table control in ASP.NET. I found some sample code that does what I'm seeking, but it only adds a single row. It seems like the table row count does not carry from one page load to the next. The user should be able to add as many rows as desired, and I need to capture the data from each row. What am I missing? Code below. <%@ Page Language="VB" %> <script runat="server"> Sub btnAddEmail_Click(ByVal Sender As Object, ByVal e As EventArgs) Dim tr As New TableRow Dim tcLabel As New TableCell Dim tcTextBox As New TableCell Dim