title: How to use Partial view in mvc4
body: <p>I do have a textbox and a submit button. All I have to do is to get the records based on the date provided and when a get request is made I just want to display a textbox and button. For Post request I want to check the date matches with the record and want to display the data within same view. How is that possible. I am having the view as</p>
  
  <pre><code>@model IEnumerable&lt;ShopOnline.Models.Order&gt;
  
  
  &lt;script type="text/javascript"&gt;
  $(function () {
      $("#Date").datepicker({dateFormat:"dd/mm/yy"});
  });
  &lt;/script&gt;
  @using(Html.BeginForm())   
  {
  &lt;table&gt;
  &lt;tr&gt;
      &lt;td&gt;Enter Date&lt;/td&gt;
      &lt;td&gt;@Html.TextBox("Date")&lt;/td&gt;       
      &lt;td&gt;&lt;input type="submit" value="Submit" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  }
  &lt;table border="1"&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;td&gt;Order&lt;/td&gt;
          &lt;td&gt;Product Name&lt;/td&gt;
          &lt;td&gt;Quantity&lt;/td&gt;
          &lt;td&gt;Amount&lt;/td&gt;
          &lt;td&gt;Price&lt;/td&gt;
          &lt;td&gt;Date&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      @foreach(var item in Model)
      {
  &lt;tr&gt;
      &lt;td&gt;Select Date&lt;/td&gt;
      &lt;td&gt;@item.Order_Id&lt;/td&gt;
      &lt;td&gt;@item.Product_Name&lt;/td&gt;
      &lt;td&gt;@item.Quantity&lt;/td&gt;
      &lt;td&gt;@item.Amount&lt;/td&gt;
      &lt;td&gt;@item.Order_Date&lt;/td&gt;
  &lt;/tr&gt;
      }
      &lt;/tbody&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is the controller Action Method</p>
  
  <pre><code> public ActionResult Admin()
      {
          return View(db.Orders.ToList());
      }
      [HttpPost]
      public ActionResult Admin(DateTime Date)
      {
          var record = db.Orders.Where(x =&gt; x.Order_Date ==Date).ToList();
          return View(record);
      }
  </code></pre>
  
  <p>Now here the problem is I will get all the records displayed if I perform GET Request and I only want to display a textbox and button on GET request and  while if I perform a POST Request I want to get list of records in the same view with a textbox and button. So can Partial View be applied here and how will that work</p>