I thought this would be easier but I can not find a decent example.
I created a Custom Control, Tester, with a TextBox. When I use the control on a WebForm I want to be able to choose the Control from the top dropdownlist (in the IDE) and have the Textbox's TextChanged event available in the right dropdownlist.
My code
--
Private txt As TextBox
Protected Overrides Sub CreateChildControls()
txt = New TextBox
txt.ID = "txt"
AddHandler txt.TextChanged, AddressOf Me.OntxtTextChanged
Me.Controls.Add(txt)
End Sub
Public Overridable Sub OntxtTextChanged(ByVal sender As Object, ByVal e As EventArgs)
RaiseBubbleEvent(Me, e)
End Sub
--
I would expect the OntxtTextChanged event to show as an avaiable event for Tester in the WebForm.
Please advise
--
rp
I created a Custom Control, Tester, with a TextBox. When I use the control on a WebForm I want to be able to choose the Control from the top dropdownlist (in the IDE) and have the Textbox's TextChanged event available in the right dropdownlist.
My code
--
Private txt As TextBox
Protected Overrides Sub CreateChildControls()
txt = New TextBox
txt.ID = "txt"
AddHandler txt.TextChanged, AddressOf Me.OntxtTextChanged
Me.Controls.Add(txt)
End Sub
Public Overridable Sub OntxtTextChanged(ByVal sender As Object, ByVal e As EventArgs)
RaiseBubbleEvent(Me, e)
End Sub
--
I would expect the OntxtTextChanged event to show as an avaiable event for Tester in the WebForm.
Please advise
--
rp