0

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?

3 Answers 3

2

HttpUtility.UrlDecode

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

1

HttpUtility.UrlDecode will do. Check this MSDN link

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.