tags:

views:

31

answers:

1

Hi

I'm looking into ASP.NET MVC, and whether or not to make the switch. One thing that I do a heck of a lot in ASP.NET, is to render HTML on AJAX callbacks and sent back to the client. I use a generic ViewManager for rendering User Controls.

I created a sample MVC App from the templates, and was looking for the RenderUserControl method inside a Controller. I found: System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial but that doesn't seem to be what I'm looking for in this context.

Is there an equivalent to the ASP.NET ViewManager in MVC?

A: 

What you want to do is return a partial view:

public ActionResult IWillCallThisViaAjax()
{
    return PartialView("MyUserControlName");
}
Craig Stuntz