G
Guest
Hi,
I have linkbuttons created dynamically and they display fine on the web
page. However, when I click on the those link buttons, the event doesn't fire.
Please tell me what's wrong with the following code. Thanks.
Dim lbtnQuestion As LinkButton = New LinkButton
lbtnQuestion.Text = "Question " & (j + 1).ToString()
lbtnQuestion.CommandArgument = j
AddHandler lbtnQuestion.Command, AddressOf lbtnQuestion_Click
........................................................................................
Private Sub lbtnQuestion_Click(ByVal sender As Object, ByVal e As
CommandEventArgs)
Response.Write("Hey")
End Sub
I have linkbuttons created dynamically and they display fine on the web
page. However, when I click on the those link buttons, the event doesn't fire.
Please tell me what's wrong with the following code. Thanks.
Dim lbtnQuestion As LinkButton = New LinkButton
lbtnQuestion.Text = "Question " & (j + 1).ToString()
lbtnQuestion.CommandArgument = j
AddHandler lbtnQuestion.Command, AddressOf lbtnQuestion_Click
........................................................................................
Private Sub lbtnQuestion_Click(ByVal sender As Object, ByVal e As
CommandEventArgs)
Response.Write("Hey")
End Sub