I am developing a web application in Asp.Net C#. I have a filter with four options. user can select anyone from that filters and then URL will be changed according. I am writing rules for them in my Global.aspx file. I have implemented urls but those are not perfectly working.
routes.MapPageRoute("event-listing-city", "{city}/events/{category}/{PriceRange}/{EventEntry}/{PropertyType}", "~/EventListing.aspx", false, new RouteValueDictionary {{"category", "all"}, {"PriceRange", "price"}, {"EventEntry", "entry"}, {"PropertyType", "ptype"} });
routes.MapPageRoute("event-listing-zone", "{city}/{zone}/events/{category}/{PriceRange}/{EventEntry}/{PropertyType}", "~/EventListing.aspx", false, new RouteValueDictionary {{"category", "all"}, {"PriceRange", "price"}, {"EventEntry", "entry"}, {"PropertyType", "ptype"} });
routes.MapPageRoute("event-listing-locality", "{city}/{zone}/{locality}/events/{category}/{PriceRange}/{EventEntry}/{PropertyType}", "~/EventListing.aspx", false, new RouteValueDictionary {{"category", "all"}, {"PriceRange", "price"}, {"EventEntry", "entry"}, {"PropertyType", "ptype"} });