Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Getting fragment from URL

Reply
Thread Tools

Getting fragment from URL

 
 
michael@diverge.com
Guest
Posts: n/a
 
      09-29-2007
I have a series of pages I want to put a link on that will allow them
to go back to the page they entered from (the referring URL). The
problem is that to return to the previous page correctly I need the
fragment (page.asp#fragment) along with the referring url. Problem is
that ASP does not seem to provide that. Any advice on how to get the
fragment along with the URL?

For those who might suggest doing a javascript back()... this will not
work since the area people are going into can be a group of pages and
they may click around a few times before wanting to return, so I was
going to save the referring URL when the enter.

Thanks

 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      09-29-2007
Gazing into my crystal ball I observed writing in
news: oups.com:

> I have a series of pages I want to put a link on that will allow them
> to go back to the page they entered from (the referring URL). The
> problem is that to return to the previous page correctly I need the
> fragment (page.asp#fragment) along with the referring url. Problem is
> that ASP does not seem to provide that. Any advice on how to get the
> fragment along with the URL?
>
> For those who might suggest doing a javascript back()... this will not
> work since the area people are going into can be a group of pages and
> they may click around a few times before wanting to return, so I was
> going to save the referring URL when the enter.
>
> Thanks
>


The fragment is client side and ASP has no way of accessing it. If the
page in question has a lot of information you could do something like:

<ul>
<li><a href="#part1">Part 1</a><li>
<li><a href="#part2">Part 2</a></li>
<li><a href="#part3">Part 3</a></li>
</ul>

<h2 id="part1">Title</h2>
<p>....</p>
<h2 id="part2">Title</h2>
<p>...</p>
<h2 id="part3">Title</h2>
<p>...</p>

Most users know how to use the back button (unless you broke it opening
a new window), and also know how to use the page down key, scroll or
otherwise get around the page.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why getting error for this code fragment Amishera Amishera Ruby 3 03-31-2010 10:23 AM
Url.Fragment property is empty Roman O ASP .Net 2 05-10-2006 04:03 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM
URL-encode fragment identifier? Christian Roth XML 0 05-25-2004 10:12 PM
fragment and query part of URL in applet? Andrew Thompson Java 2 12-07-2003 07:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57