remove_endRequest and add_endRequest

Posted by Anu_dgr8 under JavaScript on 9/27/2010 | Points: 10 | Views : 8481 | Status : [Member] | Replies : 2
Why ARE these two lines of code used in javascript?

Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(EndRequestHandler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);



thanks in advance

Thanks and Regards,
Hoosha Boosha



Responses

Posted by: SheoNarayan on: 9/27/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
This looks like ASP.NET Ajax ScriptManger related stuffs.

Both even is raised after an asynchronous postback is finished and control has been returned to the browser. Read http://msdn.microsoft.com/en-us/library/bb383810.aspx for in-depth knowledge about this.

Thanks



Regards,
Sheo Narayan
http://www.dotnetfunda.com

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Anu_dgr8 on: 9/28/2010 [Member] Starter | Points: 25

Up
0
Down
Even if i remove the following line,the output remains the same..Then what's the use of including this line?Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

Thanks and Regards,
Hoosha Boosha

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response