Hi nauna,
Check this example.
HTML
<div>
Query String :<asp:TextBox runat="server" ID="txtQueryString" />
<asp:Button ID="btnChange" Text="Change Query String" runat="server" />
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#btnChange').on('click', function () {
var oldURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
if (history.pushState) {
var newUrl = oldURL + "?Id=" + $('#txtQueryString').val();
window.history.pushState({ path: newUrl }, '', newUrl);
$('#lblNewUrl').html(newUrl);
}
return false;
});
});
</script>
Screenshot