Invalid route generation with multiple parameters
See original GitHub issueMy route is defined as follows:
config.RouteTable.Add("Calendar",
"kalendar/{Year:posint}/{Month:posint}",
"Views/Calendar.dothtml",
new { Year = 0, Month = 0 });
I’m calling it from RouteLink control:
<dot:RouteLink RouteName="Calendar" Param-Month="" Param-Year="">...</dot:RouteLink>
The resulting URL is /kalendar//
instead of just /kalendar/
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
c# - Web API routing with multiple parameters
I have seen the WebApiConfig get "out of control" with hundreds of routes placed in it. Instead I personally prefer Attribute Routing.
Read more >Use invalid route handle
This is a request with an invalid route handle that cannot be decoded: curl -X GET \ 'https://router.hereapi.com/v8/routes/InvalidRouteHandle?
Read more >Attribute Routing in ASP.NET Web API 2
This topic discusses how to enable attribute routing in ASP.NET Web API 2 and describes various options for attribute routing.
Read more >Routing in ASP.NET Core
Routing is responsible for matching incoming HTTP requests and dispatching those requests to the app's executable endpoints.
Read more >URL Generation - Laravel 10.x - The PHP Framework For ...
To generate a URL to this route, you may use the route helper like so: ... helper may also be used to generate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we should replace sequences of multiple slashed with just one slash in the URL and make sure that it will match the route correctly. This should work the same as in MVC, so we should do a research how this thing works there and then adjust the behavior to be the same in DotVVM.
We’ve discussed this and we can validate the parameter constraints when generating the link (when the page is compiled), and maybe generate warnings when the parameter is data-bound.