I have an aspx page like this :
<asp:UpdatePanel runat="server" UpdateMode="always">
<ContentTemplate>
<asp:DropDownList autopostback="true" runat="server" ID="DropDown1" OnSelectedIndexChanged="DropDown1_SelectedIndexChanged">
</asp:DropDownList>
<asp:DropDownList autopostback="true" runat="server" ID="DropDown2" OnSelectedIndexChanged="DropDown2_SelectedIndexChanged">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
At each selectionChanged of any of the 2 dropdowns, a partial postback is done and I refresh the updatePanel content. However, I would like to execute some js code only after a refresh panel was triggered by the selectionChanged of DropDown1.
How can I in my page, get on clientSide, the event right after the updatePanel was refreshed and more important, the id of the control (in this case DropDown1)that has triggerred the refresh panel.
I have try this, but it's called every time the page is loaded, even the first time, and I have no information on which control has triggered the updatePanel to refresh :
<script>
$(document).ready(function ()
{
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(PageLoaded)
});
function PageLoaded(sender, args) {
// I have analyzed sender and args without any information to obtain the desired id "DropDown1"
}
</script>