I have a structure like this.
UpdatePanel1
| |
| CheckBoxes - in code behind CheckBoxCheckedHandel() method
|
|---Usercontrol1
|
UpdatePanel2
|
Button1
Now here is the problem.
When I click Button1, it is causing UpdatePanel1 to refresh and calling CheckBoxCheckedHandel() method. So either I want a control name which caused postback or I want to refresh only UpdatePanel2 when Button1 clicked.
One more thing I would like to say is I am displaying Time on both update panel to see if they are refreshing when something happens. At this time button1 click event does not refresh UpdatePanel1 time but still it calls CheckBoxCheckedHandel() method.
I am stuck with this issue from last 2 days, please help.
Notes:
UpdatePanel1 – updatemode – Conditional and no triggres
UpdatePanel2 – updatemode – Conditional and asp:asyncTriggre for button1 click event
Here is how you can get the ID of a control that caused asynchronous postback. In your Page_Load handler put this code:
Following function gets the ID:
ID of a control that caused postback is stored in a hiddenfield whose name is ID of a ScriptManager for the page. Value is stored in format:
Script_Manager_ID|Control_ID