title: can't access hidden field value on code behind
body: <pre><code>javascript:
  &lt;script type="text/javascript"&gt;
      var map;
      var directionsDisplay;
      var directionsService = new google.maps.DirectionsService();
  
      $(document).ready(function () {
  
          //draw a map centered at Empire State Building Newyork
          var latlng = new google.maps.LatLng(28.536360, 77.398130);
          var myOptions = {
              zoom: 15,
              center: latlng,
              mapTypeId: google.maps.MapTypeId.ROADMAP
          };
          map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
          directionsDisplay = new google.maps.DirectionsRenderer();
          directionsDisplay.setMap(map);
          //directionsDisplay.setPanel(document.getElementById("divDirections"));
  
          $("#btnGetDirections").click(function () {
              calcRoute($("#txt_schooladdress").val(), $("#txt_address").val());
  
              //alert("Hello Testing");
          });
  
  
      });
      function displayDirections(result) {
          var html = '&lt;div style="margin:5px;padding:5px;background-color:#EBF2FC;border-left: 1px solid #EBEFF9;border-right: 1px solid #EBEFF9;text-align:right;"&gt;';
          html = html + '&lt;span&gt;&lt;strong&gt;' + $.trim(result.routes[0].legs[0].distance.text.replace(/"/g, '')) + ', ' + $.trim(result.routes[0].legs[0].duration.text.replace(/"/g, '')) + '&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;';
          document.getElementById('&lt;%= distance.ClientID %&gt;').value = $.trim(result.routes[0].legs[0].distance.text.replace(/"/g, ''));
          alert(document.getElementById("&lt;%= distance.ClientID %&gt;").value);
          alert(lblBrand.value);
          $("#divDirections").html(html);
  &lt;/script&gt;
  
  
   aspx code:
  
    &lt;asp:HiddenField ID="distance" runat="server" ClientIDMode="Static"/&gt;
  
  
   code behind:
  
    protected void btn_submit_click(object sender, EventArgs e)
    {
       string distancecla = Request.Form[distance.Value];
    }
  </code></pre>
  
  <p>i am setting value from java script to hidden field but unable to fetch value on click of the          button i can see alert of hidden field value but its not showing on code behind page ,on code behind page i am getting null value ....have tried many different process but still getting null value ...please help me out...will be really thankful to you...need a strict answer to it.</p>