Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to persist scroll position using Master Page?

I have a site that uses master pages, the only content that changes is a Div in the centre of the page.

Is there a way that I can persist the scroll position of the page between postbacks? I'm thinking that it might be possible because all pages are using the same Master Page, if not is there some other way to do this?

Thanks

like image 209
Fermin Avatar asked Jun 14 '09 14:06

Fermin


2 Answers

Try adding this.Page.MaintainScrollPositionOnPostBack = true; somewhere in the masterpage code behind (for example page load)

like image 63
Stilgar Avatar answered Nov 15 '22 18:11

Stilgar


Try this: http://radio.javaranch.com/pascarello/2005/07/18/1121709316718.html

like image 2
Andrew Siemer Avatar answered Nov 15 '22 18:11

Andrew Siemer