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

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 |
-------------------------------------------------------------
 
N

Nathan Sokalski

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.
 

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,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top