You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redirect() call ignores the name with which "old" rout is being registered in passed Func. Instead it takes just the result Route and calls routes.Add((RouteBase) redirectRoute); (without name argument).
This leads to situation that if some page contains @Url.RouteUrl("name"...) link, it fails to render due to absense of named route.
PS: I need many routes to be redirected to home page, so I have code like
var homePage = routes.MapRoute(...);
routes.Redirect(...).To(homePage);
routes.Redirect(...).To(homePage);
...
I would like to avoid registering each of the deleted routes separately since it looks redundant...
The text was updated successfully, but these errors were encountered:
Redirect() call ignores the name with which "old" rout is being registered in passed Func. Instead it takes just the result Route and calls routes.Add((RouteBase) redirectRoute); (without name argument).
This leads to situation that if some page contains @Url.RouteUrl("name"...) link, it fails to render due to absense of named route.
PS: I need many routes to be redirected to home page, so I have code like
var homePage = routes.MapRoute(...);
routes.Redirect(...).To(homePage);
routes.Redirect(...).To(homePage);
...
I would like to avoid registering each of the deleted routes separately since it looks redundant...
The text was updated successfully, but these errors were encountered: