I want to set session variable using javascript/jquery in my apsx page. Afterwards,I want to use that session variable in other page using jquery. Can anyone help me for this?
Thanks,
Priya
I want to set session variable using javascript/jquery in my apsx page. Afterwards,I want to use that session variable in other page using jquery. Can anyone help me for this?
Thanks,
Priya
You can set the session variable value in hidden field when page is initially loaded like this:
<asp:HiddenField ID="HDSessionValue" runat="server" Value'<%#Session["CustomerID"]'/>
Now you can easily get the value from jquery or javascript like this:
$(document).ready(function(){
var SessionValue=$('#HDSessionValue').val();
alert(SessionValue);
});