Question

I am working on a legacy ASP.NET 1.1 application which doesn't have linkified bread crumb navigation. By this I mean, the bread crumbs exist, but are not hyperlinked.

One of the current requirements is to linkify all the crumbs properly. Each page is a report pulled from the database based on three or four querystring parameters and the datagrid that displays it is built dynamically in runtime.

I don't have too much choice to implement some kind of a sitemap system. Also, it is not easy to just plug in a sitemap system, since there is no easy pattern of the page flow.

So I am just doing a lot of string building based on the existing conditions and injecting links appropriately.

As a result, I am using this snippet a lot:

HttpUtility.UrlDecode(Request.Url.AbsoluteUri);

I must have used it in more than 25 places. This is obviously very unhealthy.

Should I just put in a static helper method in a helper class and call it currentContextURL or something like that? Or is there a better way to accomplish this?

Thank you.

Was it helpful?

Solution

If there is an existing bread crumb links and you are limited with .NET1.1 I would stick with helper. You can implement linked-list-like class and maintain links in there and generate bread crumb from that implementation

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top