ASP.NET MVC – Extract parameter of an URL
Update RouteData.Values[“id”] + Request.Url.Query Will match all your examples It is not entirely clear what you are trying to achieve. MVC passes URL parameters for you through model binding. public class CustomerController : Controller { public ActionResult Edit(int id) { int customerId = id //the id in the URL return View(); } } public class … Read more