How to clear the scrollbar position programatically, take 2

C

Carl Mercier

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top