Request url parameter


I have a page where I am recieving an url in a parameter like this:

The problem is that when I try to retrieve the parameter "url", I only receive "" instead of "". What is the best way to receive the url, is it to extract the whole url and remove or is there a more efficient way?

Best Solution

You need to URL encode your URL parameter, otherwise it will be read as separate querystring parameters.

Use HttpUtility.UrlEncode.

Do this: string urlParameter = HttpUtility.UrlEncode("");

That will give you: