default.aspx.cs
来自「勤工俭学的管理系统 记录学生资料」· CS 代码 · 共 36 行
CS
36 行
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 + =
减小字号Ctrl + -
显示快捷键?