title: MVC C# modal popup
body: <p>ok so i'm trying to figure out how to properly call a modal popup for my page using Controllers as per this post's suggestion</p>
  
  <p><a href="https://stackoverflow.com/questions/861235/asp-net-mvc-modal-dialog-popup-best-practice">ASP.NET MVC modal dialog/popup best practice</a></p>
  
  <p>and kinda used this:</p>
  
  <p><a href="http://microsoftmentalist.com/2011/09/14/asp-net-mvc-13-open-window-or-modal-pop-up-and-fill-the-contents-of-it-from-the-controller-method/" rel="nofollow noreferrer">http://microsoftmentalist.com/2011/09/14/asp-net-mvc-13-open-window-or-modal-pop-up-and-fill-the-contents-of-it-from-the-controller-method/</a></p>
  
  <p>I have a view that has a dropdownlist, if the user can't find the item / value that he/she is looking for he can suggest a value (suggest new value link) which is supposed to call the controller and return a popup page with a couple of fields in it. </p>
  
  <p>Here're the objects on the view:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
          loadpopup = function () 
          {  
  window.showModalDialog(‘/NewValue/New′ , "loadPopUp", ‘width=100,height=100′); 
          } 
  
      &lt;/script&gt; 
  
  
  &lt;%: Html.DropDownList(model =&gt; model.ValueId, new selectlist........... %&gt;
  &lt;%: Html.ActionLink("Suggest Value", "New", "NewValue", null, new { onclick = 'loadpopup()') %&gt;
  </code></pre>
  
  <p>The controller that I'm planning to use to return the page:</p>
  
  <pre><code>public class NewValueController : Controller{
     public Actionresult New(){
        return View();
     }
  }
  </code></pre>
  
  <p>Now I'm stuck. I wanted to return a page where I can format it, do i have to return a string ? can't i return an aspx (engin i use) instead, since formatting that would be easier?</p>
  
  <p>Any advice as to which direction i should go is very much appreciated.</p>
  
  <p>Thanks!</p>