Hi guys and girls,
I seem to have a problem fully understanding url routing. Like on an aspx page called News.aspx I want to show the full news listing, on the page News.aspx?view=detail&id=x I want to show the news details. And on the Page News.aspx?view=browse&pageindex=1 I want users to be able to browse to the archives.
So basiclly I have 3 different kind of views all baked into a single .aspx page. Now Im stucked on how do go around this with ASP.NET routing.
Do I need to register 3 routes or can this be packed into one, what I now have works for the news details:
routes.Add(
"News",
new Route("news/{ArticleTitle}", new Routing.NewsRouteHandler())
);
so for the browsing and listing part do I need 2 other routes like this or am I missing something?
routes.Add(
"NewsListing",
new Route("news/", new Routing.NewsListingRouteHandler())
);
routes.Add(
"NewsBrowse",
new Route("news/page/{PageIndex}", new Routing.NewsBrowseRouteHandler())
);
I know the problem desription might not be good enough, but basiclly im asking is how to go around with url routing in a listing/browse/detail scenario while keeping things as compact as possible.
Thank you for your time. kind regards, Mark