I want to send search keywords with QueryString like google, atc... and i need a function which convert text like this
Metallica nimes concert 2009 :)
to this:
Metallica+nimes+concert+2009+%3A%29
and retrieve it
Thanks and advance
I want to send search keywords with QueryString like google, atc... and i need a function which convert text like this
Metallica nimes concert 2009 :)
to this:
Metallica+nimes+concert+2009+%3A%29
and retrieve it
Thanks and advance
you need to encode the string using:
HttpUtility.UrlEncode("Metallica nimes concert 2009 :)")
you'll need to reference to System.Web
This will work on simple strings, if you want to encode more characters see: Server.UrlEncode vs. HttpUtility.UrlEncode. as Panagiotis Kanavos recommended
Trying to encode a string into a URL?
Why not use system.net.webutility.urlencode