M
Mr Newbie
Hi,
Im doing something really stupid here, But I cant see the wood for the
trees. This is some of the code for my custom composite control. It renders
fine and the buttons do cause a Post to occur. But the Click Handlers are
not are never receiving a click event. I note that the name of the control
is _ctl0 or 1 etc.
<span id="MyDamnButton1" style="width:192px;Z-INDEX: 101; LEFT: 16px;
POSITION: absolute; TOP: 24px"><input type="submit" name="_ctl0"
value="Submit Me" /><input type="submit" name="_ctl1" value="Submit Me 2"
/></span>
What could I have done wrong ?
------------------------
Protected btnSubmit As New System.Web.UI.WebControls.Button
Protected btnSubmit2 As New System.Web.UI.WebControls.Button
Protected Overrides Sub CreateChildControls()
btnSubmit.Text = "Submit Me"
btnSubmit2.Text = "Submit Me 2"
Controls.Add(btnSubmit)
Controls.Add(btnSubmit2)
AddHandler btnSubmit.Click, AddressOf Me.Click1Handler
AddHandler btnSubmit2.Click, AddressOf Me.Click1Handler2
End Sub
Private Sub Click1Handler(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim a As Int16 = 0
End Sub
Private Sub Click1Handler2(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim a As Int16 = 0
End Sub
Im doing something really stupid here, But I cant see the wood for the
trees. This is some of the code for my custom composite control. It renders
fine and the buttons do cause a Post to occur. But the Click Handlers are
not are never receiving a click event. I note that the name of the control
is _ctl0 or 1 etc.
<span id="MyDamnButton1" style="width:192px;Z-INDEX: 101; LEFT: 16px;
POSITION: absolute; TOP: 24px"><input type="submit" name="_ctl0"
value="Submit Me" /><input type="submit" name="_ctl1" value="Submit Me 2"
/></span>
What could I have done wrong ?
------------------------
Protected btnSubmit As New System.Web.UI.WebControls.Button
Protected btnSubmit2 As New System.Web.UI.WebControls.Button
Protected Overrides Sub CreateChildControls()
btnSubmit.Text = "Submit Me"
btnSubmit2.Text = "Submit Me 2"
Controls.Add(btnSubmit)
Controls.Add(btnSubmit2)
AddHandler btnSubmit.Click, AddressOf Me.Click1Handler
AddHandler btnSubmit2.Click, AddressOf Me.Click1Handler2
End Sub
Private Sub Click1Handler(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim a As Int16 = 0
End Sub
Private Sub Click1Handler2(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim a As Int16 = 0
End Sub