Blog

ASP.NET MVC 5 and Bootstrap 3 CSS Framework

ASP.NET MVC 5 uses Bootstrap 3 as the CSS Framework in its default ASP.NET Web Application Tempate. This is a nice touch as most ASP.NET MVC developers have at least played with Bootstrap and are designing responsive websites. I'll mention the use of Bootstrap here briefly as there really isn't much to it. Feel free to read my other ASP.NET MVC 5 Tutorials on the new features in ASP.NET MVC 5: ASP.NET MVC 5 Attribute Routing and Filter Overrides in ASP.NET MVC 5...

Filter Overrides in ASP.NET MVC 5

ASP.NET MVC 5 has a new feature called Filter Overrides, which allows you to clear or replace certain filter types created in higher scopes. For example, if you created a global action filter or controller action filter, you could override those filters on a case-by-case basis at the controller action level. This allows you to set global or controller filters that apply in almost all cases and just override them in the few, specific places where those filters don't apply. I love this new Filter Overrides feature just as much as Attribute Routing in ASP.NET MVC 5. I'll take that same example I used for Attribute Routing and show how to implement Filter Overrides...

ASP.NET MVC 5 Attribute Routing

ASP.NET MVC 5 has a new feature called Attribute Routing that allows a developer to specify the route of controller actions by adding Route Attributes to them. Developers can also add a RoutePrefix Attribute on the controller if each of the controller actions within that controller share a particular route prefix. I'll show a very basic example of this using a ProductsController that will specify both a RoutePrefix on the controller as well as Route Attributes on each controller action...