Update:

in my code-behind code i have public varaible and assing like this 

```
public string Id { get { return Request.QueryString["id"].ToString(); } }` 

```

and in .aspx page i am trying to access 

```
$(this).attr("EmployeeId", Id);

```

getting the error The name 

```
'Id' does not exist in the current context

```

**end update**

i have two aspx pages:

```
1) employee.aspx
2) employee_detail.aspx

```

how to pass an dynamic id from one page to another page

the below code is in the `employee.aspx` page

```
//more code here..
//but to relvant to my question is here...

var submitButton = function()  {             
  //more code here...         
  if(employeeId != ""){   //redirecting here...
    window.location.href = "employee_detail.aspx"; 
 }    
} 

```

so in `employee_detail.aspx` page i have a jquery function, currently i am hardcoding the id 
something like this:

```
<script type="text/javascript"> 

$(document).ready(function () { 

 var id = 'A42345'; //hardcoded.... 

$(this).attr("EmployeeId", id);  

</script>

```

so my question is, i am looking a way to pass an id from `employee.aspx` and receive in `employee_detail.aspx`

i thought of doing this but for security reason i dont want to expose the id in the url:

```
window.location.href = "mypage.aspx?id = " + id; 

```