?? global.asax
字號(hào):
?<%@ Application Language="C#" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
// 在應(yīng)用程序啟動(dòng)時(shí)運(yùn)行的代碼
}
void Application_End(object sender, EventArgs e)
{
// 在應(yīng)用程序關(guān)閉時(shí)運(yùn)行的代碼
}
void Application_Error(object sender, EventArgs e)
{
// 在出現(xiàn)未處理的錯(cuò)誤時(shí)運(yùn)行的代碼
}
void Session_Start(object sender, EventArgs e)
{
// 在新會(huì)話啟動(dòng)時(shí)運(yùn)行的代碼
<%-- string startpage = "index.aspx";
string currentpage = Request.ServerVariables["url"];
if (!currentpage.Equals(startpage))
Response.Redirect("index.aspx");--%>
}
void Session_End(object sender, EventArgs e)
{
// 在會(huì)話結(jié)束時(shí)運(yùn)行的代碼。
// 注意: 只有在 Web.config 文件中的 sessionstate 模式設(shè)置為
// InProc 時(shí),才會(huì)引發(fā) Session_End 事件。如果會(huì)話模式設(shè)置為 StateServer
// 或 SQLServer,則不會(huì)引發(fā)該事件。
}
</script>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -