Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stop Response.Redirect from encoding

The URL string generated after this response.redirect is causing us a headache. It is replacing the characters with url percent encoding characters and adding in extra file directories.

Response.Redirect("TestingReport.aspx?id=" + Request.QueryString("id") + "&Test_Type_ID=" + Request.QueryString("Test_Type_ID") + "&TType=" + Request.QueryString("TType"))

https://subdomain.domain.com/User%20Portal/Testing/%2fUser%2520Portal%2fTesting%2fTestingReport.aspx%3fid%3d8444%26Test_Type_ID%3d2%26TType%3dCore%20Mandatory%202

Why is it changing ? and = to the percent codes? I don't understand why it is appending User Portal/Testing twice either.

Thanks

like image 997
Howard Tucker Avatar asked Jun 28 '11 19:06

Howard Tucker


1 Answers

It's called URLEncoding. Checkout this online utility to decode the string you have. In .NET, you can use System.Web.HttpUtility to encode/decode.

like image 76
Bala R Avatar answered Nov 15 '22 08:11

Bala R