I have a page that is doing some actions based on the value of a query string. However I recently noticed that this breaks when the Query String contains the '&' character.
I am aware I could write some code that would translate the '&' character on the parent page but I have to believe there is a better way to do this.
Here is an example: Query string:Exercise Science & Sports Studies This only returns 'Exercise Science'
Here is the code I have to get the string:
string selectedDept = Request.QueryString [ "dept" ];
I would prefer not to encrypt the URL as the pages are sometimes linked to directly.
HttpUtility.UrlEncodeandHttpUtility.UrlDecode