Use HttpUtility.UrlEncode(string QueryString) to encode a url or query string
e.g the actual url is "http://192.168.45.48/encoding/encode.aspx?crdl1=esos.{€h579". This url has some special character "{€". If you want to encode this url do as
HttpUtility.UrlEncode("http://192.168.45.48/encoding/encode.aspx?crdl1=esos.{€h579")
output will come as "http://192.168.45.48/encoding/encode.aspx?crdl1=esos.%7B%E2%82%ACh579".
And you can decode this encoded url using following code:
HttpUtility.UrlDecode("http://192.168.45.48/encoding/encode.aspx?crdl1=esos.%7B%E2%82%ACh579")
the output will come as "http://192.168.45.48/encoding/encode.aspx?crdl1=esos.{€h579"
Ty
ReplyDeleteBest Outfits For Young ladies , Womens And Girls
ReplyDeleteWe Have Some For You In Your Budget For more…..
Plz visit:- Trendy Anarkali Suit