How remember page position on postback

  • Thread starter Thread starter Bobby Edward
  • Start date Start date
B

Bobby Edward

I have a long form. When I click the submit button at the bottom the page
does some validation. But, it always refreshes and the page is at the "top"
again. How can I have it "retain" it's scroll position?

I set the page directive of Enable View State to true but tht didn't help.

Thanks.
 
The ViewState won't have anything to do with the page position, it just
stores data used by the controls on a page. Try enabling SmartNavigation on
the page instead. This works best in IE from the reports I've heard. I can't
confirm myself whether or not it works with non-IE browsers since I don't
use SmartNavigation.

Hope this helps,
Mark Fitzpatrick
 
Nathan Sokalski said:
In the @Page directive, include MaintainScrollPositionOnPostback="true"

I tried this but it didn't work. :(

This is a page that is using a master page. Does that make a difference?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top