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

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

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 |
-------------------------------------------------------------
 
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.
 
Worked out perfect, it was actually Page.SmartNavigation but I fould
it, thanks!
 

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

Back
Top