开发者

ASP.NET 4 HttpHandler in Custom Route

开发者 https://www.devze.com 2023-01-14 20:35 出处:网络
I have made a custom Route which override GetRouteData. How can I know what type of request is being done? Everything passes the GetRoutData function (.cs开发者_如何学Pythons, .js, .axd, etc) and I wo

I have made a custom Route which override GetRouteData. How can I know what type of request is being done? Everything passes the GetRoutData function (.cs开发者_如何学Pythons, .js, .axd, etc) and I would like to do something only if it is a System.Web.UI.Page.

But httpContext.Request.CurrentHandler is always null because the routing takes place just before the handler mapping...


any reason you can't limit your route to .aspx files? Do you not want to handle pages that superclass ui.page?

0

精彩评论

暂无评论...
验证码 换一张
取 消