So I need to scroll to the top of the page after an async post back in an asp.net update panel.
The code I used was this:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestEventHandler);
function EndRequestEventHandler(sender, args)
{
scrollTo(0,0);
}
However, I only want this to be run when I click on a certain button which causes the async postback.
How do I wire this event up in my code behind button event?
Any help would be appreacited, thanks!