title: pass input text from view to controller
body: <p>i know there are a lot questions like this but i really cant get the explanations on the answers... here is my view...</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
  $(function () {
      $(".datepicker").datepicker({ onSelect: function (dateText, inst) { },
          altField: ".alternate"
      });
  
  });
  &lt;/script&gt;
  
  @model IEnumerable&lt;CormanReservation.Models.Reservation&gt;
  @{
  ViewBag.Title = "Index";
  }
  
  &lt;h5&gt;
      Select a date and see reservations...&lt;/h5&gt;
  &lt;div&gt;
      &lt;div class="datepicker"&gt;
      &lt;/div&gt;
      &amp;nbsp;&lt;input name="dateInput" type="text" class="alternate" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>i want to get the value of the input text... there's already a value in my input text because the datepicker passes its value on it... what i cant do is to pass it to my controller... here is my controller:</p>
  
  <pre><code>  private CormantReservationEntities db = new CormantReservationEntities();
      public ActionResult Index(string dateInput )
      {
          DateTime date = Convert.ToDateTime(dateInput);
          var reservations = db.Reservations.Where(r=&gt;r.Date==date).Include(r =&gt; r.Employee).Include(r =&gt; r.Room).OrderByDescending(r =&gt; r.Date);
          return View(reservations.ToList());
      }
  </code></pre>
  
  <p>i am trying to list in my home page the reservations made during the date the user selected in my calender in my home page.... </p>