I have two actions in a controller and yet the parameters are not being passed into one of them.
This one: /RouteStop/List/1
And this one: /RouteStop/Details/100
And my global.asax:
  routes.MapRoute(
    "List",
    "{controller}/{action}/{id}",
    new { controller = "RouteStop", action = "List", id = UrlParameter.Optional }
  );
routes.MapRoute( "Details", "{controller}/{action}/{routeID}", new { controller = "RouteStop", action = "Details", routeID = UrlParameter.Optional } );
And here's the act开发者_StackOverflowions from my Controller:
public ActionResult List(string id)
{
  return View();
}
public ActionResult Details(string routeID) { return View(); }
When I access this URL (/RouteStop/Details/100) the parameter gets passed just fine. But when I access the other one (/RouteStop/List/1) the parameter is null. The names match up as they should but I can't figure it out.
Try replacing {controller} with List and Details in respective routes. but for your scenario the default routing that you get when you create an MVC app should work.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论