Adding rows to the table

Discussion in 'ASP .Net' started by simon, Aug 23, 2004.

  1. simon

    simon Guest

    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
     
    simon, Aug 23, 2004
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.