Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Location Links on Postback

Status
Not open for further replies.

Zarcom

Programmer
May 7, 2002
1,275
CA
Well basically yeah excatly that.
Does anyone know how to use location links you know on a post back. I have a page that is longer than the screen especially in civvy 800x600 mode. I thought that a very tasteful solution would be to add location links so that when a post back occurs the user doesn't have to scroll down to the area they last were at agian.

Anyone? Please? Hello? Oh you say I must press submit for others to see this? So I am not using a IM forum. Hmm fine then *click That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Oh man, its been so long since I did something like that...

that was over a year ago in school, where we did the whole Anchor thing (it was so ghey: had an image map of a bike, and if you clicked an area it scrolled down to a description of a pedal, or a wheel, or whatever...).

Not sure, but isn't it just like you said:

you're link has some #thing to show where to go, and you just add an anchor tag to the part in the page that you want it to go to?

D
 
I do I'll get you my number at home since I don't know it or use it at work.

I know about how to implement it with links and such I was wondering how to use it on a post back from the server.

I thought that I might do a redirect including the anchor at the end of the redirect line but that would mess up the whole post back routine up wouldn't it? That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
I have found mine own solution. I simply put the links into the page where I wanted them.
<A Name='#postion1'></A>

Then in the code-behind where I want the page to scroll down to that spot I simply add this bit of code.

dim sb as new stringbuilder()
sb.append(&quot;<Script language='Javascript'>&quot;)
sb.append(&quot;location.href='#position1'&quot;)
sb.append(&quot;</Script>&quot;)

RegisterStartupScript(&quot;locator&quot;, sb.tostring)
sb = nothing


Works like a charm! That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top