determining which object trigger postback on page_load

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

I have a page that checks to see if it's a postback on page_load. I want it
to do one of two different things depending on which object triggered the
postback. Is there a way to check to see which object triggered the
postback?

-Darrel
 
You might want to move your code from Page_Load to separate event handlers
for your controls. They will then be triggered when the relevant control is
clicked / modified.

Yea. I think you're right about that. Might have to rethink this page's
codebehind now. ;o)

-Darrel
 
Darrel,

You might want to move your code from Page_Load to separate event handlers
for your controls. They will then be triggered when the relevant control is
clicked / modified.

Edd.
 
Remember too, the sender parameter to an event represents the object
that fired the event.
 
Back
Top