I have two pages. From the first page, I open a modal with a querystring that holds that value of a client name. I then use this to set a hiddenfield on the modal that opene
Please try this code.
var hv = $("#<%= hidClientField.ClientID %>").val();