'how to add a new row to existing table row..Im using <asp:table>..with the following code it tends to remove all the previous row then only add in a new row?
BTW when i type in something in a textbox, all the previous items entered in that textbox will be listed out, how to remove it?Code:Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim m_text As String, m_row As TableRow, m_cell As TableCell, m_date As String, m_time As String m_text = TextBox1.Text m_date = "" : m_time = "" : getdatetime(m_date, m_time) 'row one m_row = New TableRow 'left cell m_cell = New TableCell m_cell.Width = 300 m_cell.Text = "Date= " & m_date & " <br/>" & _ "Time= " & m_time & "" m_row.Cells.Add(m_cell) 'right cell m_cell = New TableCell m_cell.Width = 700 m_cell.Text = m_text m_row.Cells.Add(m_cell) table1.Rows.Add(m_row) End Sub




Reply With Quote