473,399 Members | 3,832 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,399 software developers and data experts.

How to clear the SmartNavigation position programatically?

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 shown to simulate a "Next
Page" effect. Since I have many controls that require post back, I need
SmartNavigation to be turned on.

However, when I press "Next" at the end of the page, the scroll position
goes to the very bottom on the second page (where the same "Next" button
is to go to page 3, for example).

My question is, how do I clear the scroller position programatically?

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
3 1165
Yes, you SmartNavigation programmatically.

Just use Me.Page.SmartNavigation = false

and that should do the trick for you.
Nov 18 '05 #2
David,

This is not what I am looking to do. (or maybe it is)

I definately need SmartNavigation, but want to clear the scrollbar
position programmatically. Will turning it off then back on do the
trick you think?

Thanks!

Carl

David Coe wrote:
Yes, you SmartNavigation programmatically.

Just use Me.Page.SmartNavigation = false

and that should do the trick for you.

Nov 18 '05 #3
For the record, this trick doesn't work.

Carl

Carl Mercier wrote:
David,

This is not what I am looking to do. (or maybe it is)

I definately need SmartNavigation, but want to clear the scrollbar
position programmatically. Will turning it off then back on do the
trick you think?

Thanks!

Carl

David Coe wrote:
Yes, you SmartNavigation programmatically.
Just use Me.Page.SmartNavigation = false
and that should do the trick for you.

Nov 18 '05 #4

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

Similar topics

0
by: Mark Petersen | last post by:
Is there a way to prevent a page postback from being added to the browser history without using SmartNavigation? I'd like to be able to do this in a cross-browser compatible way (modern...
1
by: Nicolas LeBlanc | last post by:
First of all, I'd like to state that I would like to have SmartNavigation enabled on my site due to some massive work on the UI do to nice things that works a lot better if the scroll position is...
2
by: Rob | last post by:
Hello, I have a <DIV> in my Datagrid which produces scrollbars when it is populated. When I click the Edit button in the edit comand column I need to be able to maintain the scroll position....
0
by: Kevin Ortman | last post by:
Hi all, I am wondering if the following is a known problem, and if there are any known solutions. Thanks in advance, Kevin Ortman
1
by: Carl Mercier | last post by:
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...
1
by: Rafael Leonhardt | last post by:
I know that smartnavigation works on formpost. But I can to do smartnavigation works when I redirect to same page than post the page. Example: Actual page is "mainpage.aspx?param=xx" In a...
3
by: Rudy Ko | last post by:
Hi, I have a long site with SmartNavigation on. It works on my developing machine. When I published to server, it doesn't work on any machine. What do I miss? Anybody know? Thank you for any...
3
by: cmay | last post by:
I have just started created a web app in asp.net 2.0. I am using a masterpage for header/footer stuff. In my content page I am using MaintainScrollPositionOnPostback, and while it does keep...
5
by: Mogens Nielsen - Elbek & Vejrup A/S | last post by:
Hi, I can see from the msdn-docs that SmartNavigation is now obsolete. Why is that? The SmartNavigation feature has been replaced by MaintainScrollPosition, but the scoll position is not why...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
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.