I'm trying to get my head around a page lifecycle issue of an ASP.NET UserControl. What I have is an updatepanel with two buttons in it. Now, in the Page_Load event I need to make a check to see which of the two buttons was clicked.
I do know that I should use the click event for this, but this is a case of quite a complex page cycle with dynamically added controls and so on, so forth, so that is not an option, unfortunately :-(
I've tried to check on the Request.Form["__EVENTTARGET"]
value, but since the buttons are inside an UpdatePanel the value is an empty string (at least I guess that's why it is empty)
So bascially, is there any way to check which button was clicked in an UpdatePanel, in the Page_Load event?
Thanks in advance.
All the best,
Bo
You can get ID of control which caused postback in the Page_Load event by this method.