Attribute Routing with Multiple Leading Zero Decimals

后端 未结 2 1658
北荒
北荒 2021-01-20 22:20

Current ActionResult:

[Route(\"EvaluatorSetup/{evalYear}/{department}\")]
public ActionResult RoutedEvaluatorSetup(int evalYear, string department)
{
    ret         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-20 22:36

    Try

    [Route("EvaluatorSetup/{evalYear}/{department:string}")]
    

    I believe the default is int.

提交回复
热议问题