0

How to I format a query string so it looks like this

search?q=power+tools

currently it looks like this

search?q=power%20tools

Is there a way to do this without replacing the space for a plus sign?

2 Answers 2

1

HttpServerUtility.UrlDecode

In a ASP.NET page HttpServerUtility instance can be accessed by Page.Server property.

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

Comments

0

Not really. HttpUtility.UrlEncode encodes it that way, and that is what is used by pretty much everything in ASP.NET.

Besides, from memory %20 is actually correct for query strings, and + is correct for URLs. Ignore this, it's incorrect.

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.