开发者

ASP.net MVC controller Action with string parameter doesn't get called

开发者 https://www.devze.com 2023-01-15 06:39 出处:网络
So, I have a controller Action with this signature public ActionResult Details(string id) { ... } and a route in my global asax file

So, I have a controller Action with this signature

  public ActionResult Details(string id) { ... }

and a route in my global asax file

            routes.MapRoute(
            "DevDetails",
            "Dati/Device/Details/{id}",
            new { controller = "Device", action = "Details", id = "" });

If and only if I request urls which id ends with '%20' the action controller doesn't get called.

a开发者_StackOverflow社区ny clues ?

0

精彩评论

暂无评论...
验证码 换一张
取 消