IT Community - Software Programming, Web Development and Technical Support

ASP.NET FAQ - maintain page scroll position after a page postback?

This is a discussion on ASP.NET FAQ - maintain page scroll position after a page postback? within the ASP and ASP.NET Programming forums, part of the Web Development category; ASP.NET FAQ - maintain page scroll position after a page postback?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-24-2007, 12:38 AM
Archer Archer is offline
D-Web Programmer
 
Join Date: Jun 2007
Posts: 52
Archer is on a distinguished road
Question ASP.NET FAQ - maintain page scroll position after a page postback?

ASP.NET FAQ - maintain page scroll position after a page postback?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2007, 12:40 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: ASP.NET FAQ - maintain page scroll position after a page postback?

Say you've got some really long page, perhaps with some huge Control -- like, say, a huge, edit-enabled GridView. Someone clicks a link halfway down that page (like, say, the "Edit" link on one of the later entries in that huge GridView). It generates a postback, and the page get refreshed to its *top* instead of half-way down.
If you want, instead, to maintain the page scroll on a postback, just set the MaintainScrollPositionOnPostback property on the Page. You can do this declaratively (in your aspx Page directive) like so:

<%@ Page MaintainScrollPositionOnPostback="true" ... %>
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/asp-asp-net-programming/2594-asp-net-faq-maintain-page-scroll-position-after-page-postback.html
Posted By For Type Date
ASP.NET FAQ - maintain page scroll position after a page postback? | Web Hosting This thread Refback 03-28-2008 09:25 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' poornima ASP and ASP.NET Programming 1 03-05-2008 03:12 AM
detect hour of the day and selects a link, they go to either a day page or night page itbarota HTML, CSS and Javascript Coding Techniques 1 01-11-2008 02:09 AM
How to change aspx page to html page? S.Vinothkumar ASP and ASP.NET Programming 4 10-26-2007 11:46 PM
How can i maintain page scroll position after a postback ASP.NET 2005? a.deeban ASP and ASP.NET Programming 1 08-22-2007 10:24 PM
How can I automatically load another page or reload the same page? Archer C# Programming 0 07-16-2007 12:10 AM


All times are GMT -7. The time now is 08:34 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0