asp.netroutessystem.web.routing

Asp.Net System.Web.Routing Find actual .aspx Page


I'm using System.Web.Routing to have some better URL's and have come across a problem. I need to know the actual page that's handling the request.

for example a request comes in as:

/basketball/home

I need to find the page that handles that request, like:

/management/default.aspx

I'm only using the System.Web.Routing and not MVC. I have a handle to the RequestContext that contains some of the route information, but i don't see what i need.

Thanks in advance.

******* UPDATE *******

I was able to use Context.CurrentHandler which give me "ASP.management_default_aspx", not exactly the page but enough to get the page name.


Solution

  • I was able to use Context.CurrentHandler which give me "ASP.management_default_aspx", not exactly the page but enough to get the page name.