2

I am trying to implement ajax back/forward button support and therefore writing variables after a # in my url. I would also like the user to be able to copy the url and then link back to it. Does anyone know how can I parse the url and grab my "querystrings" even though they are behind a #?

1
  • I am trying to get the value on the server side. I can already get it on the client side. Commented Dec 4, 2008 at 16:25

2 Answers 2

11

The value after the hash is not transmitted to the server. There's another SO question about that somewhere, but I'm having trouble finding it. Likewise it's taken me a while to find a decent reference to cite, but this Wikipedia article has some confirmation:

The fragment identifier functions differently than the rest of the URI: namely, its processing is exclusively client-side with no participation from the server. When an agent (such as a Web browser) requests a resource from a Web server, the agent sends the URI to the server, but does not send the fragment.

I assume you want to respond to it on the server side rather than the browser side? (Given that you're asking about doing it in C#...)

Sign up to request clarification or add additional context in comments.

Comments

7

http://msdn.microsoft.com/en-us/library/system.uri.fragment.aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.