Adding rows to the table

S

simon

I have button on page and I would like to dynamically add new row to the
table every time, the user clicks the button.

Private Sub btnOkST_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnOkST.Click
Dim vrstica As New HtmlTableRow
Dim stolpec As New HtmlTableCell

stolpec.InnerText = "TEST"
vrstica.Cells.Add(stolpec)
tblCene.Rows.Add(vrstica)

End Sub

This adds the row to the table only the first time, when user click the
button.

If the user click more times nothing happens.
Why?

Then I would like to add the button into the added row, and when user clicks
that button, I would like that row dissapeared.

Any example?

Thank you,
Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top