473,288 Members | 2,725 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,288 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 1461

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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.