473,811 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to "snap back" to a position on a page

I have a page that displays a datalist of multiple data items. In
each dataitem I have gridviews that are pagable. It looks simular as
I show below. I just want a way of hitting the gridview paging number
on an item not to cause the page to snap back to the top of the page.
Rather I would want it to stay exactly where it's at. Is there
something I can put in the code behind (C#) in pageload that will say
snap back to where I was? Thanks
_______________ _______________ _____
| ... |
| ... |
| ... |
| ... |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| 1 2 3 |
-------------------------------------------------------------
| ... |
| ... |
| ... |
| ... |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| 1 2 3 |
-------------------------------------------------------------

Jun 25 '07 #1
3 1321
If you mean to maintain the same scroll position, the Page directive has a
Boolean property called MaintainScrollP ositionOnPostba ck which does what it
sounds like you want. Try this and see if it is what you are looking for.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Chris" <dr*****@gmail. comwrote in message
news:11******** *************@g 4g2000hsf.googl egroups.com...
>I have a page that displays a datalist of multiple data items. In
each dataitem I have gridviews that are pagable. It looks simular as
I show below. I just want a way of hitting the gridview paging number
on an item not to cause the page to snap back to the top of the page.
Rather I would want it to stay exactly where it's at. Is there
something I can put in the code behind (C#) in pageload that will say
snap back to where I was? Thanks
_______________ _______________ _____
| ... |
| ... |
| ... |
| ... |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| 1 2 3 |
-------------------------------------------------------------
| ... |
| ... |
| ... |
| ... |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| _____ |
| 1 2 3 |
-------------------------------------------------------------

Jun 25 '07 #2
Worked out perfect, it was actually Page.SmartNavig ation but I fould
it, thanks!

Jun 25 '07 #3
"Chris" <dr*****@gmail. comwrote in message
news:11******** **************@ q69g2000hsb.goo glegroups.com.. .
Worked out perfect, it was actually Page.SmartNavig ation but I fould
it, thanks!
Do not even think of using this in a public environment - it only works in
IE...
http://www.google.co.uk/search?sourc...+cross+browser
--
http://www.markrae.net

Jun 25 '07 #4

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

Similar topics

7
4346
by: George | last post by:
I am trying to set up a login-logout website. I have a cookie about the login status. I put it as logout once the logout link is clicked. And I put a little security check about the status of the cookie variable everytime before loading the detailed member profiling. The page layout is like: Login page,-->check the login name/password database-->profile page(only login cookie is true, redirect back to login if false)
4
2206
by: Food Groupy | last post by:
Hi... I use a function something like this, <a href="javascript:history.back();">Return to original page</a> to give people a "back" option sometimes on pages. Is there any way of directing them back to a particular named anchor on the last page?
6
1746
by: MLH | last post by:
You know, snap to grid when dragging a new command button or other object? If you used autocad (command line DOS) YOU know exactly what I mean. I want to size my objects - not be forced to snap to the grid.
0
1790
by: Henke | last post by:
Hi, I have done some research about my problem I have when using the "back button" in IE to go back to a page with two dropdown lists. The both dropdown lists are populated with data. The first dropdown lists is redirecting the user to another page (building a querystring for the second page to use) and when the back button
2
2056
by: VB Programmer | last post by:
I created a page which I am using to prevent the user from hitting the BACK button. I'll call it my "Auto Jump" page. When it is called it basically auto-redirects to a page specified in the QueryString. (We'll call the page it goes to the "destination page".) If the user hits BACK on the destination page it should goto the "Auto Jump" page which should put you right back to where you hit the button. In Page_Load of this "Auto Jump"...
2
3811
by: Leszek Taratuta | last post by:
Hello, I am using the following code to prevent users to see the previous pages: Response.CacheControl = "no-cache"; Response.AddHeader( "Pragma", "no-cache" ); Response.Expires = -1; When users select the "Back" button in IE, they see the message:
11
2705
by: John A Grandy | last post by:
asp.net 1.1 ie 6 how to lock-out the user from clicking the browser "Back" button ?
0
3531
by: sagarp86 | last post by:
How to lock / deactivate "Refresh" and "Back" button on browser. Problem is in voting application. Once we click for a vote application goes to next page and increament one vote in the database. But when we click on "Refresh" button on the browser, the query is fired again and again one vote is added un-necessarily..Only one vote should be posted from each pc / user. Same thing is with "Back" button on browser. when we click on vote,...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10133
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.