Updating a session variable without postback

I am passing the value in my session variable on click event of enter button on home page.The code works fine for the first time, but when user redirects from another page to home page the session gets null.I have session variable that dont update with new value.I have two pages, one were you enter the values and klick on the button and you get redirected to page 2 and there you can check your input, if this is wrong you click back-button and you go back to the first page where you can change the input but now when i click the button to validate again the new value does not show up in the session variable but only the old value.You then read this value back & but it back in the session.

updating a session variable without postback-12updating a session variable without postback-56

It loads the cities that the profile already belongs to a session variable, at which time the pop up reads the session and checks off cities that already belong to the profile.You wanna set the session value using javascript/j Query.Or you would like to get the session value in javascript/j Query. Javascript, used for manipulation of web documents, works only at browser end – as it resides at client Side.You can use this same technique for setting the session value as well.I have written an article on how to use Ajax in ASP. Below Get Set Session Value method is used for both setting and getting the session value.