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
Include ClientIDMode="Static" in your code.
var obj = $('#hidClientName').val();
Or
var obj = $('#<%=hidClientName.ClientID%>').val();