Sender._postBackSettings.panelID returns null in non-IE browsers?
I have two update panels on the same page. Upon request, I want to check which refresh panel has been updated. I read sender._postBackSettings.panelID
it should be good for this :)
However, when I get the postback in a non-IE browser, does the barID just return null? It works really well in IE ...
Here's the code:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(
function(sender, args) {
var postBackControls = sender._postBackSettings.panelID.split("|");
........
});
I have 2 updates, both with conditional updatemodes:
<asp:UpdatePanel ID="updScheduleTemplate" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
.........
and
<asp:UpdatePanel ID="updSpecialDays" runat="server"
OnLoad="updSpecialDays_OnLoad" UpdateMode="Conditional">
<ContentTemplate>
..........
Any help would be much appreciated and I am open to alternative solutions that do not include sender._postBackSettings.panelID
Thank you in advance:)
source to share
Try add_pageLoaded :
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);
function pageLoaded(sender, args)
{
var panels = args.get_panelsUpdated();
if (panels.length > 0)
{
for (i=0; i < panels.length; i++) {
var panelID =panels[i];
}
}
}
I know it sounds like it won't work, but according to the following article from MSDN, there is good reason to believe that it will catch updatepanel closing events as well. http://msdn.microsoft.com/en-us/magazine/cc163413.aspx
_postBackSettings is private and cannot be intended for external use.
source to share