I take advantage of an update panel and would like to use the ScrollPositioning
but it doesn't work.
I use maintainScrollPositionOnPostBack="true"
in .aspx pages.
What can I do so that it works?
I take advantage of an update panel and would like to use the ScrollPositioning
but it doesn't work.
I use maintainScrollPositionOnPostBack="true"
in .aspx pages.
What can I do so that it works?
I'm using this solution (require jQuery):
<script type="text/javascript">
var docScrollTop;
var prm = Sys.WebForms.PageRequestManager.getInstance();
function BeginRequestHandler(sender, args) {
docScrollTop= $(document).scrollTop();
}
function EndRequestHandler(sender, args) {
$(document).scrollTop(docScrollTop);
}
prm.add_beginRequest(BeginRequestHandler);
prm.add_endRequest(EndRequestHandler);
</script>
This is one of the possible sollutions taken from Personal Blog of Mustafa Başgün
https://basgun.wordpress.com/2008/06/09/maintain-scroll-position-updatepanel-postback/