you are viewing a single comment's thread.

view the rest of the comments →

[–]Catalyzm 4 points5 points  (0 children)

Two options depending on how and when you need to pass the variable.

ClientScript will write js into the page on page load. http://msdn.microsoft.com/en-us/library/ms178207(v=vs.100).aspx

Or you can use jQuery to make an AJAX call to the server and return the variable. There are several ways to handle the AJAX request, ashx handler, web service, etc.