.Net AJAX UpdatePanel Stop Snap-To

Posted in Tutorials

To keep the AJAX UpdatePanel in ASP.NET from changing scroll position (and causing a snap-to effect) insert this Javascript function beneath the ScriptManager tag.

var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_beginRequest(beginRequest); function beginRequest() { prm._scrollPosition = null; }