title: How to call jQuery popup window with a partial view in it?
body: <p>in my MVC web apps, I need to create a popup window with a Partial view (contains webgrid) in it,
   The problem is the partial view data did not show on the dialogbox, I only see the title. it seems I have problem with the controller call, as well, please be noted I used dynamic model creation since the model was created dynamically in the controller, not an existing model, no sure how to use this type of model. Thanks for any help, 
  This is my codes:
     this is button in razor view: 
      this jQuery codes:</p>
  
  <pre><code>  $(document).ready(function () {
              $("#GetEmp").click(function (event) {
                  $("#popup").dialog({
                      width: 200,
                      hight: 400,
                      title: 'please select an employee',
                      modal: true,
                      open: function (event, ui) {
                          $(this).load("@Url.Action("Travel", "GetEmployee")");
                      }
  
                  });
              });
          });
  </code></pre>
  
  <p>This is controller code:</p>
  
  <pre><code>    public class Employee
      {
          public string EmpName;
          public string EmpPhone;
          public string EmpNum;
      }
  
      [HttpPost]
      public ActionResult GetEmployee()
      {
          List&lt;Employee&gt; Emp = new List&lt;Employee&gt;
          {
                 new Employee {  EmpName= "ScottGu", EmpPhone = "23232323", EmpNum="242342"},
                 new Employee { EmpName = "Scott Hanselman", EmpPhone = "3435353", EmpNum="34535"},
                 new Employee { EmpName = "Jon Galloway", EmpPhone = "4534535345345",   
                    EmpNum="345353"}
  
           };
  
          return PartialView("_EmpPartial", Emp );
      }
  </code></pre>
  
  <p>And this is Employee partial view: please note, I am using dynamic in model, since the model  is created dynamically.</p>
  
  <pre><code> @model dynamic
   &lt;ul&gt;
   @foreach (var emp in Model) {
     &lt;li&gt;
       @emp.EmpName
     &lt;/li&gt;   
     } 
    &lt;/ul&gt;
  </code></pre>
  
  <p>Hi, thanks for the quick response, I tried it, Remove [HttpPost] and changed @foreach to @foreach (var emp in Model as List), 
  but the  does not compile with a red underline in it. do I have to keep @model dynamic in my partial view? </p>