none
AddHandler and AddressOf is not working

    Pertanyaan

  • I've created dynamic table and rows will be added to the asp.net page by button click. 

    what i need to do is,

                           my last column of the table is a button and i need to right a event for this button.

    i used following code and it is not working. please help. i'm using vb. 

    add button to the table

            Dim cell9 As New TableCell()
            Dim tb9 As New Button()
            tb9.Text = "Delete"
            tb9.ID = "rg"
            tb9.Width = 80
            cell9.Controls.Add(tb9)
            row.Cells.Add(cell9)
            AddHandler tb9.Click, AddressOf Me.Button1_Click


    event function for the button

        Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs)
            ClientScript.RegisterStartupScript(Me.GetType, "Button_Alert", "alert('Button clicked!');", True)
        End Sub

    19 April 2018 9:57

Semua Balasan

  • There is few change you get your answer here while this is not the proper forum for your question. 

    In this Microsoft forum there is also few chance but you can try it at least. It is the proper one for your question. 

    http://forums.asp.net


    Success
    Cor

    19 April 2018 10:13
  • There is few change you get your answer here while this is not the proper forum for your question. 

    In this Microsoft forum there is also few chance but you can try it at least. It is the proper one for your question. 


    Success
    Cor

    Thankx Cor
    19 April 2018 10:36