title: set razor @Html.Hidden within javascript function
body: <p>Is there way to set razor @HTML.Hidden control value within a JavaScript code block?</p>
  
  <pre><code>&lt;tbody&gt;
  
                      @Html.Hidden("customerID")
                      @if (Model != null)
                      {
                          var customers = Model.Customers.ToList();
                          for (var i = 0; i &lt; customers.Count; i++)
                          {
                          &lt;tr class="gradeX"&gt;
                              &lt;td&gt;
                                  &lt;a href="#"&gt;&lt;span onclick="GetCustomerID()"&gt;@customers[i].CustomerId.ToString()&lt;/span&gt;&lt;/a&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;a href="#"&gt;@customers[i].Name&lt;/a&gt;
                              &lt;/td&gt;                                
                          &lt;/tr&gt;
                          }
                      }
                  &lt;/tbody&gt;
  </code></pre>
  
  <p>and my JavaScript block is </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var globleCustomerId = null;
  
      function GetCustomerID() {
  
          globleCustomerId = $('#customerID').val();
  
          //globleCustomerId value should be set to @Html.Hidden()
  
  
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Within this JavaScript block I need to set globleCustomerId value to @Html.Hidden("customerID").</p>
  
  <p>How to get that value?</p>