The only method that I'm aware of achieving something like this is to store the value of the variable in a cookie. Should this be running server-side however, you could add it to a hidden input field, and retrieve it from the submitted data. Alternatively, pass it through as a QueryString or in ASP, set a Session or Server-Side cookie variable containing the value, should it be used throughout the site.
There might be a number of other, easier methods, but in that case I think I can also learn something new from this thread.
For the particular application I have to develop a server side solution is not workable
I think your best bet in this case is to store the value in a cookie, or as mentioned by requestcode, within the URL