|
-
Nov 9th, 2004, 11:13 AM
#1
Thread Starter
Hyperactive Member
Add serverSide onClick event to dynamically created control
I have created a button dynamically..
i.e
Dim submitBut as New Button()
submitBut.Text = "Submit Poll"
myForm.Controls.Add(submitBut)
Now what I am trying to do is add onClick functionality to my button so that when clicked it calls my server-side function...
i.e
Sub SubmitPoll(Sender as Object, E as EventArgs)
End Sub
How can I do this????
submitBut.onClick = "SubmitPoll"
doesn't work
-
Nov 9th, 2004, 12:48 PM
#2
Thread Starter
Hyperactive Member
Easy, can't believe it took me an hour to find this!
AddHandler submitBut.Click, AddressOf submitBut_onClick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|