title: JavaScript - How to Set values to Session in Javascript
body: <p>I want to set the Dropdown selected value in Session. I have done in Code behind. But for some condition i have to Do in Client Side Itself. i tried the following. but i did't solution yet.</p>
  
  <pre><code>&lt;%Session["Test"] = "Welcome Mamu";%&gt;  
  var session_value='&lt;%=Session["Test"]%&gt;';  
  alert(session_value);
  </code></pre>
  
  <p>The above work fine. Note that i have assign Static value(Welcome Mamu). but for Dynamatic,</p>
  
  <pre><code>var strTest=document.getElementById('DropDownList1').value;  
  &lt;%Session["Test"] = "'+ strTest +'";%&gt;
  </code></pre>
  
  <p>It is Working fine in Client Side. But i Server Side(Code Behind), the Session["Test"] value is '+ strTest +'.</p>
  
  <p>Is any other way to assign values to Session?</p>