Retrieving anchor value from URL
Lately i have been trying to get a grasp of the anchor value from the URL using ASP.NET. From what i learned from the forum (This might be wrong since there is a way in PHP(http://www.php.net/manual/en/function.parse-url.php) to get the anchor value.)
The url above send the user to a page product and then your browser interpret the anchor and scroll down way to the description anchor. But the question is why the heck would i want to get the anchor since it’s just an anchor ? There might be several reasons for that. Here is 2 of them:
- You might not want to pass an extra parameter in your URL query string because of Referencing issues
There might be several other reasons, but these two give you and idea of what is to be achieved.
var anchorValue; var url = document.location; var strippedUrl = url.toString().split("#"); if(strippedUrl.length > 1) anchorvalue = strippedUrl;
- Disabling Change Tracking in Entity Framework
- HTTP Logs Analysis using Microsoft Log Parser
- Using windows hosts file
- ASP.NET: HyperLink and Label without Id attribute
- Freelancing, Online jobs for professionals
- Exception: Collection was modified; enumeration operation may not execute.
- Paging large result sets with SQL query
- Annoying software: a rogues' gallery
- Padding is invalid and cannot be removed.
- Goodbye Netscape Navigator