Reputation: 3839
I log query string of a page. It's with C#
.
How can i convert strings like %2c%20
to a normal string in C#
code?
Upvotes: 0
Views: 3255
Reputation: 4361
HttpUtility.UrlDecode will do. Check this MSDN link
Upvotes: 1
Reputation: 460148
If the string is in the current request's url-parameters, you can use Request.QueryString
to access it which decodes it implicitely. Otherwise use HttpUtility.UrlDecode
.
Upvotes: 1