In ~/Views/ViewStart.cshtml
:
@{
Layout = Request.IsAjaxRequest() ? null : "~/Views/Shared/_Layout.cshtml";
}
and in the controller:
public ActionResult Index()
{
return View();
}
More Related Contents:
- How to render a Razor View to a string in ASP.NET MVC 3?
- Razor: Declarative HTML helpers
- ASP.NET MVC DropDownListFor with model of type List
- asp.net-mvc: razor ‘@’ symbol in js file
- How do I define a method in Razor?
- Possible to access MVC ViewBag object from Javascript file?
- How to declare a local variable in Razor?
- How to retain spaces in DropDownList – ASP.net MVC Razor views
- razor view with anonymous type model class. It is possible?
- How to edit multiple models in a single Razor View
- Uploading image in ASP.NET MVC
- How to use multiple form elements in ASP.NET MVC
- File Upload ASP.NET MVC 3.0
- ASP.NET MVC: Custom Validation by DataAnnotation
- Prevent Caching in ASP.NET MVC for specific actions using an attribute
- Custom validation attribute that compares the value of my property with another property’s value in my model class
- Adding your own HtmlHelper in ASP.NET MVC 3
- When should I use Html.Displayfor in MVC
- I want to understand the lambda expression in @Html.DisplayFor(modelItem => item.FirstName)
- Converting ASP.NET MVC Razor @helper function into a method of a helper class
- Visual Studio 2015 Broken Razor Intellisense
- How to elegantly deal with timezones
- Complex models and partial views – model binding issue in ASP.NET MVC 3
- ASP.NET MVC Razor render without encoding
- Client Id for Property (ASP.Net MVC)
- MVC 5 BeginCollectionItem with Partial CRUD
- How to get current page URL in MVC 3
- Redirect to another page when user is not authorized in asp.net mvc3
- ASP.NEt MVC using Web API to return a Razor view
- asp.net MVC3 razor: display actionlink based on user role