Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 25 Jun 2007 18:52 GMT
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                                                   |
-------------------------------------------------------------
Nathan Sokalski - 25 Jun 2007 19:26 GMT
If you mean to maintain the same scroll position, the Page directive has a
Boolean property called MaintainScrollPositionOnPostback which does what it
sounds like you want. Try this and see if it is what you are looking for.
Signature

Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.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
[quoted text clipped - 28 lines]
> | 1 2 3                                                   |
> -------------------------------------------------------------
Chris - 25 Jun 2007 20:24 GMT
Worked out perfect, it was actually Page.SmartNavigation but I fould
it, thanks!
Mark Rae - 25 Jun 2007 20:50 GMT
> Worked out perfect, it was actually Page.SmartNavigation 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?sourceid=navclient&aq=t&hl=en-GB&ie=UTF-8&rlz=1T4
GGIH_en-GBGB220GB220&q=SmartNavigation+cross+browser


Signature

http://www.markrae.net


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.