Asp.Net System.Web.Routing查找实际的.aspx页 [英] Asp.Net System.Web.Routing Find actual .aspx Page

查看:74
本文介绍了Asp.Net System.Web.Routing查找实际的.aspx页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用System.Web.Routing获得更好的URL,并遇到了问题。我需要知道正在处理请求的实际页面。

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.

例如,一个请求来自:

/basketball/home

我需要找到处理的页面该请求,例如:

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

/management/default.aspx

我只使用System.Web.Routing,而不使用MVC。我有一个RequestContext的句柄,其中包含一些路由信息,但我看不到我的需要。

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.

预先感谢。

*******更新*******

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

我能够使用 Context.CurrentHandler ,这给了我 ASP.management_default_aspx ,不完全是页面,但足以获取页面名称。

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.

推荐答案

我能够使用Context.CurrentHandler给我 ASP.management_default_aspx,它不完全是页面,但足以获取页面名称。

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.

这篇关于Asp.Net System.Web.Routing查找实际的.aspx页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆