July 8th, 2003, 03:46 AM
runs at server Question
I have a web control asp:textbox runat=server
I want to add a client side script that handles the OnTextChanged event
but Iím getting an error:
'myScriptFunc' is not a member of 'ASP.myPageName_aspx'
I understand that the page search for the method at the server side
How do I add a client side code to a web control that runs at server?
July 8th, 2003, 10:08 AM
Page will need Table1, and Label1
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
x = New Button()
x.Text = "Test Button"
x.ID = "MyButtonID2"
AddHandler x.Click, AddressOf DynamicClick
Public Sub DynamicClick(ByVal sender As Object, ByVal e As System.EventArgs)
Dim b As Button
b = CType(sender, System.Web.UI.WebControls.Button)
Label1.Text = "This is from server side -- You Clicked the Button! - " & sender.id & " "
July 9th, 2003, 12:41 AM
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.