Tuesday, April 22, 2014

How to render an action without layout in ASP.NET MVC?

    public class HomeController : Controller
    {
        public string Create()
        {
     return "Hello";
 }
    } 
There are a couple of other ways:
http://stackoverflow.com/questions/5318385/mvc-3-how-to-render-a-view-without-its-layout-page
Change Layout default setting etc.
But return a string or json result, it is great way in some scenarios.

No comments:

Post a Comment