Junior Developer
Junior Developer

Reputation: 171

Request.QueryString[] does not return my desired value

I have the following URL: /Login.aspx?ReturnUrl=Default.aspx#/mydesign

Request.QueryString["ReturnUrl"] only returns "Default.aspx".

Why doesn't it return "Default.aspx#/mydesign"?

Upvotes: 4

Views: 520

Answers (1)

EricLaw
EricLaw

Reputation: 57115

Because everything after the hash mark (#) is called a fragment, and per the HTTP spec, the fragment portion of the url is never sent to the server. You can check it in clientside JavaScript only.

Upvotes: 3

Related Questions