Ambient values in mvc2.net routing

前端 未结 6 1916
生来不讨喜
生来不讨喜 2020-12-16 06:41

I have following two routes registered in my global.asax file

routes.MapRoute(
    \"strict\",
    \"{controller}.mvc/{docid}/{action}/{id}\",
          


        
6条回答
  •  攒了一身酷
    2020-12-16 07:25

    I have the same "not clearing out" value problem...

    I've stepped into source code and I don't understand the reason for being of segment commented as : // Add all current values that aren't in the URL at all

    @ System\Web\Routing\ParsedRoute.cs, public BoundUrl Bind(RouteValueDictionary currentValues, RouteValueDictionary values, RouteValueDictionary defaultValues, RouteValueDictionary constraints) method from line 91 to line 100

    While the clearing process is correctly handled in method preceding steps, this code "reinjects" the undesired parameter into acceptedValues dictionary!?

提交回复
热议问题