📄 default.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default_aspx : System.Web.UI.Page
{
// Page events are wired up automatically to methods
// with the following names:
// Page_Load, Page_AbortTransaction, Page_CommitTransaction,
// Page_DataBinding, Page_Disposed, Page_Error, Page_Init,
// Page_Init Complete, Page_Load, Page_LoadComplete, Page_PreInit
// Page_PreLoad, Page_PreRender, Page_PreRenderComplete,
// Page_SaveStateComplete, Page_Unload
protected void Page_Load(object sender, EventArgs e)
{
Session["admin"] = "";
}
protected void Login1_LoggingIn(object sender, LoginCancelEventArgs e)
{
if(Login1.UserName== ConfigurationSettings.AppSettings["admin"] && Login1.Password==ConfigurationSettings.AppSettings["password"])
{
Session["admin"] = "admin";
Response.Redirect(@"work\index.aspx");
}
else
Login1.FailureText = "出错,请重新再试;如果问题仍然存在,请与技术人员联系";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -