title: How can I trigger a JQuery dialog to close from an MVC partial view's controller?
body: <p>I have a partial view that is rendered inside of a JQuery dialog. I can easily open and close the dialog using javascript, but I can't seem to get the dialog closed from within the partial view's controller.</p>
  
  <p>I thought I could just use a JavascriptResult:</p>
  
  <pre><code>return new JavaScriptResult { Script = "$(\"#popupDiv\").dialog(\"close\");" };
  </code></pre>
  
  <p>But that just displays the javascript in the browser.</p>
  
  <p>What is the poper way to signal my JQuery dialog to close from within a controller action?</p>