title: put vb.net nested session value in a javascript variable
body: <p>I have a vb.net aspx page that i need to assign a session variable inside of javascript</p>
  
  <p>if i do the following </p>
  
  <pre><code>var baz ="&lt;%=Session("User")%&gt;";
  alert(baz);
  </code></pre>
  
  <p>the alert i receive is the class name</p>
  
  <pre><code> "TheName.WebFramework.Security.AdvanceUser"
  </code></pre>
  
  <p>i need a nested value of this session , and have no idea how to do this in vb</p>
  
  <p>i do however know how to do this in C# / generic http handler</p>
  
  <pre><code> ...
   public void ProcessRequest (HttpContext context) {
      IAdvanceUser user = context.Session["User"] as IAdvanceUser;
   ... 
      var ID = user.EntityID
  </code></pre>
  
  <p>and of course in php, RoR , ColdFusion, ect</p>
  
  <p>I have tried this but it failed miserably</p>
  
  <pre><code>var baz ="&lt;%=Session("User").("EntityId")%&gt;";
  alert(baz);
  </code></pre>
  
  <p>any ideas?</p>