views:

18

answers:

0

Hi there,

I have a ASP.NET 3.5 webforms project I have enabled routing over. I also have in the project a number of controls doing different things based on what page they are currently being shown in. It would seem that the most straightforward way to control this different behavior is to discover which route was used to load the page and then do things according to that.

However, I can't seem to find a way to discover the route bar looking at the actual request URL and running a regex over it which isn't great. Does anyone know a way to look it up some other way?

Update: there still doesn't appear to be a way to do this in ASP.NET 4.0. Hopefully someone else has figured this out?