Header

Friday, 25 November 2011

How to Decode URL

//////////////////////////////////////////////////////////

var new1="http://www.abc.com/About%20Us/Pages/Default.aspx";
var newe=decodeURI(new1);
alert(newe);
//////////////////////////////////////////////////////////


This is for encoding the url
var newe=encodeURI(new1);

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
We can decode url or Querystring by server side code

Dim _queryString As String = HttpUtility.UrlDecode(Request.QueryString().ToString())

now _queryString will hold decoded value
Thanks.....