title: How to get value from JavaScript to homecontroller?
body: <p>I have a timer in my project and when I stop it the timer value should be saved to the database, but I cannot get the value of the timer from JavaScript to the homecontroller. </p>
  
  <p><strong>My JavaScript is:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  document.getElementById("starttime").innerHTML = ((hour&lt;=9) ? "0"+hour : hour) + " : " + ((min&lt;=9) ? "0" + min : min) + " : " + sec;
  .
  .
  .
  .
  .
  &lt;/script&gt; 
  
  &lt;script type="text/javascript"&gt;
           $(document).ready(function () {
               $("#End").click(function () {
                   $.ajax({ url: '/Home/SaveAnsDetails?classs=' + ($("#txtClass").val())
                    + '&amp;ExamDate=' + ($("#ExamDate").val())
                      + '&amp;ddd=' + ($("#starttime").val()),&lt;!--timer value starttime is passed to ddd--&gt;
                       type: "Post",
                       dataType: "json",
  
                       success: function (message) {
                           alert(message);
                       }
                   });
               });
           });
  
  &lt;/script&gt;
  
  &lt;div id="starttime" style="font-size:large; "&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>Homecontroller coding is</strong></p>
  
  <pre><code>    [ActionName("SaveAnsDetails")]
      public ContentResult SaveAnsDetails(ModelGridAllFeatures model, IList&lt;VW_Grid_Answer1&gt; ds, string ExamDate, string ddd)
      {
  
      }
  </code></pre>
  
  <p>ddd get from starttime(timer value). when I get the ddd value in homecontroller it contains an empty value.</p>
  
  <p>Any ideas?</p>