关于GLOBAL.ASAX的一个简单问题
我现在想搞一下URL重写,网上的参考代码都是直接在GLOBAL.ASAX中的Application_BeginRequest里面写代码,但是.NET2.0的GLOBAL.ASPX中好像并没有Application_BeginRequest,我自己加了一下也没实现网上的URL重写的效果,请高手指教。
[解决办法]
up
[解决办法]
直接写void Application_BeginRequest(....)就行
[解决办法]
我也同意楼上的意见!
[解决办法]
void Application_BeginRequest(Object sender, EventArgs e)
[解决办法]
.NET2.0的GLOBAL.ASPX中好像并没有Application_BeginRequest
===>
有的
void Application_BeginRequest(object sender, EventArgs e)
{
//把所有的请求重定向到abc.aspx
System.Web.HttpContext.Current.RewritePath("abc.aspx");
}