How to know because of which control event postback happens?

Hi Everybody,

I want to know how to know because of which control event postback happends How can I know.............................

e.g. One Button Name btnAdd is there and its postback property is true.

When I click on that button postback happens and pageload will get called,now I want to get that button's id in pageload function.......




Answer this question

How to know because of which control event postback happens?

  • Dean Wagner

    First of all, you can't. Event handlers fire AFTER page load, and before page prerender. You probably need to move some code from the load event to the prerender event.

    However, asp.net questions are off topic here. If that doesn't solve your question, or if you have more, you should take them to www.asp.net or www.codeproject.com. Good luck !!



  • How to know because of which control event postback happens?