Advertisement

01.20.2008 at 10:33PM PST, ID: 23097576
[x]
Attachment Details

Get named anchor from URL

Asked by Oxfam_Australia in WebApplications, Programming for ASP.NET, Microsoft Visual Basic.Net

Tags: VB.NET

Hi folks.  I'm having trouble getting a named anchor from a url, i.e. the bit after the hash symbol in http://www.myurl.com#namedAnchor without using JavaScript (as I want things to work for people with scripting turned off).  It doesn't seem to show up in any of the server variables I'm aware of.  I've tried such things as the following:

Request.ServerVariables("SCRIPT_NAME")
Request.ServerVariables("URL")
Request.ServerVariables("QUERY_STRING")
Request.RawUrl

Even if I examine everything returned by Request.ServerVaraibles I can't find can find any reference to "#namedAnchor".

I gather that means that I can't get the named anchor using ServerVariables (I suppose because it's not a server variable).  Is that true?  Is there some other way of getting the named anchor without having to use JavaScript?Start Free Trial
[+][-]01.21.2008 at 01:31AM PST, ID: 20704742

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: WebApplications, Programming for ASP.NET, Microsoft Visual Basic.Net
Tags: VB.NET
Sign Up Now!
Solution Provided By: vb_jonas
Participating Experts: 1
Solution Grade: A
 
 
[+][-]01.22.2008 at 04:17PM PST, ID: 20719765

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628