title: Loading MVC4 PartialView inside jQuery ui Dialog window
body: <p>I'm trying to display a partial view inside jQuery ui dialog window but I'm not having much luck with the load function. Dialog window does open but I dont see the content of the partial view.</p>
  
  <p>JS code is in a external js file. alert does display.</p>
  
  <pre><code>$(document).ready(function () {
      $('#dialog-modal').dialog({
          autoOpen: false,
          //width: 200,
          height: 400,
          modal: true,
          open: function (event, ui) {
              //alert("test");
              $(this).load("@Url.Action(\"OpenDialogWindow\", \"Home\" )");
          }
      });
  });
  </code></pre>
  
  <p>==================================================================</p>
  
  <p>My div is on the master page like this.   </p>
  
  <pre><code> &lt;div id="dialog-modal" title="Select a city to see the listings"&gt;  &lt;/div&gt; 
  </code></pre>
  
  <p>========================</p>
  
  <p>My ActionResult looks like this. I do have the view set as a partial view. </p>
  
  <pre><code>public ActionResult OpenDialogWindow()
          {
              return PartialView("DialogView");
          }
  </code></pre>
  
  <p>========================</p>
  
  <p>My view looks like this.</p>
  
  <pre><code>@using TheSGroup_Web.ViewModels
  @model CitiesViewModel
  
      &lt;p&gt;this is the content.
      &lt;/p&gt;
  </code></pre>