S
StefVan
Hi
I'm building dynamic Web Control buttons. Each button must handle the same event (Click or Command) but only the last created button will reply on the click event and not the others. What's wrong
Many Thanks
Public DomainPlace As PlaceHolde
Public WithEvents CmdDomain As Butto
Sub Page_Load(ByVal s As Object, ByVal e As EventArgs
For Each ud In usr.UserDomain
CmdDomain = New Button(
CmdDomain.Text = ud.DomainDesc
CmdDomain.CommandName = ud.DomainI
CmdDomain.CommandArgument = ud.DomainUr
DomainPlace.Controls.Add(CmdDomain
Nex
End Su
Sub CmdDomainClick(ByVal s As Object, ByVal e As EventArgs) Handles CmdDomain.Clic
' Do something here..
End Sub
I'm building dynamic Web Control buttons. Each button must handle the same event (Click or Command) but only the last created button will reply on the click event and not the others. What's wrong
Many Thanks
Public DomainPlace As PlaceHolde
Public WithEvents CmdDomain As Butto
Sub Page_Load(ByVal s As Object, ByVal e As EventArgs
For Each ud In usr.UserDomain
CmdDomain = New Button(
CmdDomain.Text = ud.DomainDesc
CmdDomain.CommandName = ud.DomainI
CmdDomain.CommandArgument = ud.DomainUr
DomainPlace.Controls.Add(CmdDomain
Nex
End Su
Sub CmdDomainClick(ByVal s As Object, ByVal e As EventArgs) Handles CmdDomain.Clic
' Do something here..
End Sub