What is Routedata.Values[“”]?

后端 未结 2 688
面向向阳花
面向向阳花 2021-02-07 06:21

I am surprised to see that there is no article which answers this question with any details. I have few questions related to RouteData.Values[\"\"].

I saw t

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-07 06:49

    RouteData is an attribute of the basic Controller class, so you can access RouteData in any controller. RouteData contains routing information for the current request. You can use RouteData to get controller, operation or parameter information as shown below.

    Note that you need to convert to the appropriate data type or use the implicit type variable var.

提交回复
热议问题