Click here to Skip to main content
15,036,441 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
How Can i maintain my Scroll bar position of my website page when page is postback
i try my self a lot but unable to find answer.
please help me.
Posted

hey it is good you tried but your question has a very easy solution.

You can maintain the position of Scroll Bar when page is posted back by using a simple attribute in Page Directive
XML
<%@ MaintainScrollPositionOnPostback="true"%>

by default its value is False.
   
v2
For a complete postback, you can have a look at this: Maintain Scroll Position on Postback in ASP.NET 2.0[^]
For partial rendering, have a look at this:
Handling scroll in UpdatePanel via Javascript[^]
   

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