Moving down a page in code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm handling a postback from an ASP.NET Checkbox and I ideally want the page
when reloaded to position itself back to where the user was. This is similar
to using the '#' in the url I think, i.e.
http://localhost/mysite/mypage.aspx#marker

Is there was way of doing this in a postback event handler?

Thanks for your help
 
IIRC some browsers, like IE will do this automatically, no need to force it.
The risk is that if you pass it the value to "jump" it may re-post again.
 
I think asp.net provides a solution for thist. Turn on smart navigation.
This is an attribute of the page directive i think. If using VS, you will
see the property in the properties window. Set it to true
 
The problem is identifying in the page where the user was. The browser has
no way of knowing the scroll position of the window. You might have a look
at SmartNavigations, but from what I've heard, it may or may not work.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
Thanks for all your input guys,

I shall check out this SmartNaviation in a short while. I've broken things a
little at the moment :-(
 
Cool, this works a treat. Thanks

Gravy said:
Thanks for all your input guys,

I shall check out this SmartNaviation in a short while. I've broken things a
little at the moment :-(
 

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