Creating a Custom UrlRemapper
Module
The <urlMappings>
configuration element discussed in the previous section performs a simple task. It remaps one page to another. However, you quickly discover that you need to perform more complex remappings.
For example, imagine that you have a database that contains a table of product categories and a table of products. You want your website’s users to request a URL that contains a product category and to see matching products. For example, if someone requests the /Products/Soda.aspx
page, you want to display all the products in the Soda category. If someone requests the /Products/Milk.aspx
page, you want to display all the products in the Milk category.
In that case, you need to use a wildcard when matching ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.