See this JavaScript
<script type="text/javascript">
var queryString = new Array();
$(function () {
if (queryString.length == 0) {
if (window.location.search.split('?').length > 1) {
var params = window.location.search.split('?')[1].split('&');
for (var i = 0; i < params.length; i++) {
var key = params[i].split('=')[0];
var value = decodeURIComponent(params[i].split('=')[1]);
queryString[key] = value;
}
}
}
if (queryString["Name"] != null && queryString["City"] != null) {
var data = "<u>Values from QueryString</u><br /><br />";
data += "<b>Name:</b> " + queryString["Name"] + " <b>City:</b> " + queryString["City"];
$("#lblData").html(data);
}
});
</script>
You can find the complete code in this article which will explain you how to Pass and Read the QueryString from one page to other using JavaScript.
Send (Pass) Data (Values) from one page to another using jQuery
Here i have sent the QueryString from Code behind.
protected void Redirect(object sender, EventArgs e)
{
Response.Redirect("~/Default.aspx?Name=Azim&City=Mumbai");
}