Routing optional parameters in ASP.NET MVC 5

后端 未结 2 574
孤独总比滥情好
孤独总比滥情好 2020-12-03 06:31

I am creating an ASP.NET MVC 5 application and I have some issues with routing. We are using the attribute Route to map our routes in the web application. I hav

2条回答
  •  無奈伤痛
    2020-12-03 07:07

    //its working with mvc5
    [Route("Projects/{Id}/{Title}")]
    public ActionResult Index(long Id, string Title)
    {
        return view();
    }
    

提交回复
热议问题