Top "Asp.net-mvc-routing" questions

Questions about routing within ASP.

How to route GET and DELETE requests for the same url to different controller methods

Here are my routes in Global.asax routes.MapRoute("PizzaGet", "pizza/{pizzaKey}", new { controller = "Pizza", action = "GetPizzaById" }); routes.MapRoute("DeletePizza", "…

asp.net-mvc asp.net-mvc-routing
Change route collection of MVC6 after startup

In MVC-5 I could edit the routetable after initial startup by accessing RouteTable.Routes. I wish to do the same …

c# asp.net-core routes asp.net-core-mvc asp.net-mvc-routing
How to prevent Url.RouteUrl(...) from inheriting route values from the current request

Lets say you have an action method to display products in a shopping cart // ProductsController.cs public ActionMethod Index(string …

asp.net-mvc-routing
Can you pass a model with RedirectToAction?

I'm using mvc 2 release candidate, and am wondering if there's any way to pass a model to an action using …

asp.net-mvc asp.net-mvc-2 asp.net-mvc-routing
Asp.net mvc routing without a controller or action name

I am trying to redirect all urls that don't match an existing controller to a certain controller. For example, the …

asp.net-mvc asp.net-mvc-5 asp.net-mvc-routing
Link to a root controller from area controller in ASP MVC

How can I link to one of my root controllers from one of my areas? <% Html.RenderAction("Action", "Page", …

c# asp.net-mvc asp.net-mvc-2 asp.net-mvc-routing asp.net-mvc-areas
Setup a route {tenant}/{controller}/{action}/{id} with ASP.NET MVC?

I would like to setup a multi-tenant ASP.NET MVC app. Ideally, this app would have a route with {tenant}/{…

asp.net-mvc asp.net-mvc-routing multi-tenant
ASP.NET MVC Default routes accessible via area routes

So far (for brevity) I have one route in global.asax registered like this: routes.Add(new LowercaseRoute("{action}/{id}", …

asp.net-mvc-3 asp.net-mvc-routing asp.net-mvc-areas
How to determine if an arbitrary URL matches a defined route

How can I tell if a string matches a particular named route? I have a route like this: routes.MapRoute( "…

c# asp.net-mvc url routing asp.net-mvc-routing
How to determine Route Prefix programmatically in asp.net mvc?

I wanted to provide some URL separation for my public/anonymous controllers and views from the admin/authenticated controllers and …

c# asp.net-mvc asp.net-mvc-5 asp.net-mvc-routing attributerouting