📄 global.asax
字号:
<%@ Language="C#" %>
<%@ Import Namespace="System.IO" %>
<script runat=server>
void Application_BeginRequest(Object sender , EventArgs e)
{
string strUsername;
string strCustomPath;
if ( Request.Path.ToLower().IndexOf("custom" ) == -1 )
{
strUsername = Path.GetFileNameWithoutExtension(Request.Path);
if ( Request.ApplicationPath == "/" )
strCustomPath = string .Format( "/custom/default.aspx?username={0}", strUsername );
else
strCustomPath = string .Format( "{0}/custom/default.aspx?username={1}", Request.ApplicationPath, strUsername );
Context.RewritePath( strCustomPath );
}
}
</Script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -