0
votes

I'm using ASP.Net 4 URL routing on a web forms site.

I have multiple routes to a single page

routes.MapPageRoute("","our-services", "~/Information.aspx"); routes.MapPageRoute("","our-company", "~/Information.aspx");

On the destination page (Information.aspx) how can I tell which route was used to get there, for example was it from our-services or our-company?

2

2 Answers

0
votes

You can try with

HttpRequest.RawUrl

it should contain the original URL that was called (i.e. before the rewriting)

0
votes

From the information page, you could check who referred to it via Request.UrlReferrer.

HTH.