determining which object trigger postback on page_load

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
 
D

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
 
E

Edd

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.
 
S

Scott Allen

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top