which web control called method?

Renidrag

Newcomer
Joined
Sep 8, 2004
Messages
3
Location
Cambridge Ontario
If I have a one method that gets called from different web controls by postback, How can i determine which control did the postback to the Method?

This method does the exact same thing for each control on the page with just one variable difference that i want to choose in a switch statement.

Thanks in advance
Renidrag
 
You question doesn't make clear if the method is an event handler or just a method. I suppose its an event handler for multilpe controls. If so you can cast the sender parameter to the type of the control and check the ID property to see who did the postback

Ctype(sender,Button).ID="button1"
 
Back
Top