473,385 Members | 1,647 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,385 software developers and data experts.

Resetting scroll position in MaintainScrollPositionOnPostBack

Setting MaintainScrollPositionOnPostBack=true gets me the behavior I
most often want, but there are times when I need to have the scroll
position return to the top of the page - instead of the last scroll
position. Is there a way to reset the scroll position in an event
handler? From looking at the generated html, I see two hidden fields
that are embedded in the form:

<input type="hidden" name="__SCROLLPOSITIONX" id="__SCROLLPOSITIONX"
value="0" />
<input type="hidden" name="__SCROLLPOSITIONY" id="__SCROLLPOSITIONY"
value="100" />

Is there a way to access and change these values in a PostBack event?
I can see it as:

Request.Form["__SCROLLPOSITIONY"]

But this is a Read-Only access.

Thanks,
Chris Rathman

May 15 '06 #1
0 1465

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

Similar topics

6
by: | last post by:
Hi all, I have a long web form on asp.net 2.0. When I go at the bottom and click on submit, a postback occurs and if there are any validation errors (no client-side checking being done), the...
4
by: Miguel Dias Moura | last post by:
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...
1
by: Wayne Sepega | last post by:
Ultimately what I need is a way to remember the scroll position of the form on a post back. I have a button that posts back to the current form and if there are no errors the form is reproduced, I...
3
by: the friendly display name | last post by:
I have on a site some very populated listboxes, now, when the user scrolls the listbox to chose some items, and then clicks a button, thus, a postback starts, the scoll position of the listbox is...
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...
0
by: jasondavidcarr | last post by:
Hello all, I have a "comments" page that contains three sections; the article to be commented on is on top, followed by previous comments, and on the bottom a place to add new comments. It's 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...
4
by: Bobby Edward | last post by:
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...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
I placed a button on a form menustrip for the purpose of causing the horizontal scrollbar of my form to appear so that I can access controls outside of the form's current view (the controls are...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.