Use Session variable in Javascript
<p>below is my asp behind code:</p>

<pre><code>Public Shared Sub GetClient()
{
   System.Web.HttpContext.Current.Session("MYVAR") =somevariable.ToString;
}
</code></pre>

<p>and here is my javascript script</p>

<pre><code>&lt;script type="text/javascript"&gt;
   var a = '&lt;%= Session("MYVAR") %&gt;';
   document.getElementById("&lt;%=txt_box1.ClientID%&gt;").value = a;
&lt;/script&gt;
</code></pre>

<p>I do not know if I'm missing something, because there is nothing in my var a to display.</p>

<p>Any suggestions ? thanks</p>
