user603007 user603007 - 2 years ago 117
Javascript Question MVC 3 error when calling Html.RenderAction

I am a newbie to mvc 3. How can you render a view within a div by calling an action:


<div id="dialog-modal" title="Basic modal dialog">


public ActionResult Popup()
return PartialView();

I am getting an error:

The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments

Answer Source

Try wrapping your HtmlHelper in a code block:

@{ Html.RenderAction("Popup", "Home"); }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download