title: Executing javascript function upon returning result in MVC controller action
body: <p>I'm stuck with the following scenario: There is a list of items on a page. Each item has a <code>href</code> that redirects it to the needed controller and action, i.e. when the list is populated each item's href is set to <code>/Controller/Action/Parameter</code>. Consequently, this is not a AJAX post, it's just a redirect when clicking on an item in the list (so no <code>onSuccess</code> unfortunately).</p>
  
  <p>The respective controller action then retrieves a response from the repository. Now I need to display the response results in a dialog that pops up over the current page. </p>
  
  <p>I currently implemented a solution with javascript: <code>function ShowDialog(data)</code>. This displays the dialog and binds the data.</p>
  
  <p>I have been trying without success to find a way to return a JavaScript result in my controller action that will call <code>ShowDialog</code>. Is this the way to go? Can I call javascript functions like that, returning <code>JavaScript(someScript)</code>?</p>