473,395 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Scroll in Asp.Net Postback


Hello,

When my page is postback on a button click even my page scrolls up to
the original position.

How to make my page return to the last scroll possition or maybe to a
specifique scroll position after postback?

I am working on Asp.Net 2.0.

Thank You,
Miguel

Mar 9 '06 #1
4 1984
Add a page directive..

<%@ Page MaintainScrollPositionOnPostback="true" ... %>

"Miguel Dias Moura" <md*REMOVE*moura@gmail*NOSPAM*.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...

Hello,

When my page is postback on a button click even my page scrolls up to the original position.

How to make my page return to the last scroll possition or maybe to a specifique scroll position after postback?

I am working on Asp.Net 2.0.

Thank You,
Miguel

Mar 9 '06 #2
In ASP.NET 2.0 this is easy.
Simply use this line of code:

Page.MaintainScrollPositionOnPostBack = True

--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://SteveOrr.net

"Miguel Dias Moura" wrote:

Hello,

When my page is postback on a button click even my page scrolls up to
the original position.

How to make my page return to the last scroll possition or maybe to a
specifique scroll position after postback?

I am working on Asp.Net 2.0.

Thank You,
Miguel

Mar 9 '06 #3
this was already answered on this newsgroup a week ago

"Miguel Dias Moura" <md*REMOVE*moura@gmail*NOSPAM*.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...

Hello,

When my page is postback on a button click even my page scrolls up to the
original position.

How to make my page return to the last scroll possition or maybe to a
specifique scroll position after postback?

I am working on Asp.Net 2.0.

Thank You,
Miguel

Mar 9 '06 #4
excellent.

"Progman" <ad*******@hotmail.com> wrote in message news:jY******************@weber.videotron.net...
this was already answered on this newsgroup a week ago

"Miguel Dias Moura" <md*REMOVE*moura@gmail*NOSPAM*.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...

Hello,

When my page is postback on a button click even my page scrolls up to the original position.

How to make my page return to the last scroll possition or maybe to a specifique scroll position after postback?

I am working on Asp.Net 2.0.

Thank You,
Miguel


Mar 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: ed | last post by:
Does anyone know if ASP.NET 2.0 is going to incorporate "maintain scroll position on postback" in non-IE browsers like Firefox? This seems like an often requested feature on these newsgroups...
5
by: JezB | last post by:
There are a few references on the net about how to restore a page's scroll position over a postback. This is a simple one which works for me: eg....
4
by: Emmanuel | last post by:
Hi, I have placed a DataList control inside a panel control to obtain a scrollable list using the overflow:auto attribute. The rows in the data list contains and edit LinkButton to enable...
3
by: rmunson8 | last post by:
I have added Panel control to a web page which contains a GridView. The Panel's ScrollBars property is set to auto. When I select the Select CommanField button for a row (which obviously causes a...
2
by: parm | last post by:
I have a <div> with Overflow = Auto and within it have several controls that can cause postback. The problem is that after every postback, the <div> would scroll back top. Is there a way that the...
0
by: Keithb | last post by:
The maintain scroll position on postback feature works as expected with my site running under localhost on the development machine. When the files are posted to an IIS 6.0 web server running on a...
6
by: C. Moya | last post by:
I hope someone has an answer: MaintainScrollPositionOnPostback works great. But, the problem is that sometimes we need to manually reset the scroll position back to the top (such as when hiding a...
5
by: RobertK | last post by:
I have a table that displays one row of images (thumbnails). When a user clicks on an image it opens up a bigger image below it. The row has about 20 cells. I have a <divtag which allows the user...
7
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.