Moving down a page in code

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
 
C

Curt_C [MVP]

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.
 
T

Tampa.NET Koder

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
 
K

Kevin Spencer

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.
 
G

Guest

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 :-(
 
G

Guest

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top