Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can I Set maintainScrollPositionOnPostback="true" in master Page?
Posted

There is no property "maintainScrollPositionOnPostBack" for master page because this property is only for Pages. Master page is a user control actually (It is derived from UserControl class).

If you want to set for all the pages the add this property in the web.config section as mkgoud suggested.
 
Share this answer
 
If you set maintainScrollPositionOnPostback to true then after the page postback the user returns to the same position in the browser before the postback.

If you want maintain scroll position in all pages you can set <pages maintainScrollPositionOnPostBack="True"> in web.config.
 
Share this answer
 
v2
Hi,

You can't do that in a Master page, becausemaster page is not a "page" but a user control . It would only work for a actual pages.

But you can set it for one single page in the head secion, or all pages in the Web.Config file in the Pages Element.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900