472,782 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to clear the scrollbar position programatically, take 2

Hi,

I have a long form that post back to itself at different places
(different controls). At the very end, I have a button called "Next"
that post back to itself again causing some panels to be hidden and some
others to be shown to simulate a "Next Page" effect. Since I have many
controls that require post back, I need SmartNavigation to be turned on.
SmartNavigation should work for all controls on my page, EXCEPT for
the Next button at the bottom of the page.

The problem is that when I press "Next", the scrollbar goes to the
bottom of the second page. Obviously, it should go to the top instead.

My question is, how do I clear the scroller position programatically in
the Click event of my Next button?

Example (I simplified the code for easy reading)

Private Sub btnGoNextPage_Click
ClearScrollerPosition()
GoNextPage() 'Go to the top of next page
End Sub

Thanks!

Carl
Nov 18 '05 #1
1 1289
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Carl Mercier" <info@carl_nospam_-mercier_dot_com> wrote in message
news:u%****************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a long form that post back to itself at different places
(different controls). At the very end, I have a button called "Next"
that post back to itself again causing some panels to be hidden and some
others to be shown to simulate a "Next Page" effect. Since I have many
controls that require post back, I need SmartNavigation to be turned on.
SmartNavigation should work for all controls on my page, EXCEPT for
the Next button at the bottom of the page.

The problem is that when I press "Next", the scrollbar goes to the
bottom of the second page. Obviously, it should go to the top instead.

My question is, how do I clear the scroller position programatically in
the Click event of my Next button?

Example (I simplified the code for easy reading)

Private Sub btnGoNextPage_Click
ClearScrollerPosition()
GoNextPage() 'Go to the top of next page
End Sub

Thanks!

Carl

Nov 18 '05 #2

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

Similar topics

1
by: alvinpoon | last post by:
Hello, I have a problem setting the scrollbar position of a div region on a webpage which is posted at http://www.geocities.com/virtuosity999/Logon.htm If the page is loaded with Netscape,...
4
by: Paul T. RONG | last post by:
Dear all, Can one control the subform scrollbar through vba? For example, I would like to make two command buttons on the main form to control the subform scrollbar. Click 1st button the...
1
by: gmtongar | last post by:
Hi, I've made a custom scrollbar which consists of three buttons and a panel. My problem is: How do I move it like a scrollbar slider? I've tried DoDragDrop, but it does not appear to be the same,...
0
by: ZenMaster | last post by:
Hello, can anyone help me figure out what may be wrong with my code - In VC++ 6.0 Ive created a ScrollBar using : -------------------------------------------- hwndScrollHue = CreateWindowEx...
3
by: Carl Mercier | last post by:
Hi, I have a long form that post back to itself at different places. At the very end, I have a button called "Next" that post back to itself again but some panels are hidden and some others are...
6
by: Jorge Luzarraga Castro | last post by:
Hey, hope you can help with this. I have an aspx page which contains several User Control. At the beggining there´s only one visible User Control but after working with the page additional UC...
0
by: onzinnig | last post by:
Hello, I have a problem where a frame does not repaint a part of a window when using the horizontal scrollbar. Easier then explaining is to try out the two html pages at the bottom of this...
0
by: ranabhavin2 | last post by:
Hi , I have made chat application in asp.net using atlas. It is database chat. So, every 1 minutes page is going to refresh and fetch data from database. All the data of chatting I m...
1
by: qhimq | last post by:
Hi, I have a lot of edit child windows and text painted on a windows application made from the API all at runtime. How do I go about making the scrollbar to move them all? What I attempted: ...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.