I have Routing working in ASP.NET C # WebForms using Microsoft.AspNet.FriendlyUrls, but not for all pages.
Here is an example:
routes.MapPageRoute("List/{Location}/{ZipCode}/", "List/{Location}/{ZipCode}/", "~/List.aspx");
The above page (List.aspx) in page_load in the Page.RouteData file does not have .count values.
Page.RouteData.Values.Count == 0
I have another page on the same site with relevant information:
routes.MapPageRoute("{Location}/{ZipCode}/{Name}/{LocID}/{ID}/{Code}/", "{Location}/{ZipCode}/{Name}/{LocID}/{ID}/{Code}/", "~/place.aspx");
This page (place.aspx) always shows the correct number of routes.
While on the List page in debug mode, I checked the sequence and location, and there was ZipCode.
So, what could cause Page.RouteData to not appear on one page, but to be available in another?
Jeremy sanzone
source share