I am trying to solve an ASP.NET UserControl page lifecycle issue. I have an update panel with two buttons. Now in the Page_Load event, I need to check to see which of the two buttons was pressed.
I know that you need to use the click event for this, but this is a case of a rather complex page loop with dynamically added controls, etc. etc., so this is not an option, unfortunately: - (
I tried to check the value Request.Form["__EVENTTARGET"], but since the buttons are inside the UpdatePanel, the value is an empty string (at least I think why it is empty)
So, is there a way to check which button was clicked in the UpdatePanel in the Page_Load event?
Thanks in advance.
All the best
Bo
source
share