Dynamic Actions of Controllers
How to retrieve query string parameter in action.- By passing action argument as Query string parameter public ActionResult Index(string urlparameter) { return Content("Your Url parameter is " + urlparameter); } By ID Parameter: ASP.NET MVC’s default routing...
Attribute routing in asp.net mvc
Today we are going to discuss a very important concept of MVC 5 and Web API 2 that is attribute routing. Attribute routing is used to define various attributes routing URL over controller and actions level. Up to mvc4 we learned about convention based routing. To...
Routing Constraint in Asp.Net MVC
Before understanding about routing constraints we should have knowledge about routing. Routing is a mechanism by which we can call specific controller and their actions through specified URL. We can Define Multiple roots into RootConfig.cs file using map route...
non action attribute in mvc
It's a attribute that which is used on the methods who are defined by public access modifier.Actually MVC Framework treats all public methods as URL but in case if you don't want this then you have to make a method buy decorated it by non action attribute.Same may be...