📄 houtai.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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 houtai : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
if (TextBox1.Text == "")
{
Sp.MessageBox.Show(this.Page, "请输入用户名!");
}
else if (TextBox2.Text == "")
{ Sp.MessageBox.Show(this.Page, "请输入密码!"); }
else
{
string pu, pw;
pu = spstr.tosql(TextBox1.Text);
pw = spstr.tosql(TextBox2.Text);
string sql = "select * from usercenter where usertext='" + pu + "' and userpass='" + pw + "' and sx='管理员'";
DataTable dt = new DataTable();
dt = Spbase.GreatDs(sql).Tables[0];
if (dt.Rows.Count > 0)
{
Response.Write("<script language=javascript>alert('您已经成功登陆!');top.location.href='admin/back_admin.aspx';</script>");
}
else { Response.Write("<script language=javascript>alert('非法登陆!');</script>"); }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -