title: How to access viewstate using javascript?
body: <p>I am trying to access view-state in client side but following exception coming :
  <img src="https://i.stack.imgur.com/72Jmm.png" alt="enter image description here"></p>
  
  <p><strong>JAVASCRIPT:</strong></p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
      var vCode = '&lt;%=ViewState("code")%&gt;';
      alert(dateView);
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>CODE BEHIND:</strong></p>
  
  <pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      ViewState("code") = "EE"
  End Sub
  </code></pre>
  
  <p>Anybody suggest me how to do it?</p>