I've implemented URL routing that comes with .NET 3.5 SP1 and I'm new to implementing URL routing. For the most part, it was fairly easy and painless. Here's my question. There are several different functions in my ASP.NET application where I can take advantage of URL Routing e.g. show product information, edit product information, etc.
I'd like to have a single handler class that resolves URLs for product related scenarios regardless of where the request comes from. In my code below, it's very easy to handle a single URL scenario but how do I handle it if I wanted this handler to be a general purpose handler for ALL URLs pertaining to products.
Here's what the code looks like:
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
string strProductName = requestContext.RouteData.Values["ProductName"] as string;
if (string.IsNullOrEmpty(strProductN ...
Go to the complete details ...