I was trying out the routing feature but got into an issue.
I have a folder /tools in which there is a default.cshtml file.
In other pages, I link to this folder using: @Href("~/tools/actionType/objectType/objectId/")
As the /tools folder only contains the default.cshtml, shouldn't Webmatrix/asp.net process default.cshtml and I should be able to get:
- UrlData (would return "actionType")
- UrlData (would return "objectType")
- UrlData (would return "objectId")
I checked the documentation once more and read:
If the search found no exact matches for .cshtml files in their specified folders, ASP.NET continues looking for these files in turn:
1. /a/b/c/default.cshtml (no path information).
2. /a/b/c/index.cshtml (no path information).
I guess I'm doing something wrong?
I get a "ressource not found", the default.cshtml still should be found though no? Or does the doc implies that if there is no actual file name matching, the param will not be existents and therefore the 'false' folders will throw that error?
View Complete Post