IT Community - Software Programming, Web Development and Technical Support

How can i maintain page scroll position after a postback ASP.NET 2005?

This is a discussion on How can i maintain page scroll position after a postback ASP.NET 2005? within the ASP and ASP.NET Programming forums, part of the Web Development category; Hi, Say i've got some really long page, perhaps with some huge Control -- like, say, a huge, edit-enabled ...


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 (permalink)  
Old 08-22-2007, 10:22 PM
a.deeban a.deeban is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 279
a.deeban is on a distinguished road
Default How can i maintain page scroll position after a postback ASP.NET 2005?

Hi,


Say i'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.
I want, instead, to maintain the page scroll on a postback.


need help ....


thnx...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-22-2007, 10:24 PM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default Re: How can i maintain page scroll position after a postback ASP.NET 2005?

Hi
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


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
how to maintain the session in multi server vijayanand PHP Programming 2 10-13-2007 01:10 AM
What are the cycle of methods involved when a page loads in dot net 2005? Archer ASP and ASP.NET Programming 1 07-25-2007 03:42 AM
ASP.NET FAQ - maintain page scroll position after a page postback? Archer ASP and ASP.NET Programming 1 07-24-2007 12:40 AM
Applying CSS to Scroll Bar raj HTML, CSS and Javascript Coding Techniques 1 07-13-2007 01:05 AM


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


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

SEO by vBSEO 3.0.0