How do you safely encode a URL using JavaScript such that it can be put into a GET string?
Here is what I am doing in jQuery:
var url = "mynewpage.aspx?id=1234";
$(location).attr('href', url);
And in the ASP.NET page_load, I am reading this:
_string _id = Request.QueryString["id"].ToString();
How can I encode the id in jQuery/JavaScript and decode in ASP.NET (C#)?