?? login.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 admin_login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string auid = uid.Text.ToString();
int buid = Convert.ToInt32(odb.scr("select count(*) from [admin] where [uid]='" + auid + "'"));
string apwd = pwd.Text.ToString();
int bpwd = Convert.ToInt32(odb.scr("select count(*) from [admin] where [pwd]='" + apwd + "'"));
if (buid > 0 && bpwd >0)
{
Session["qx"] = odb.scr("select qx from [admin] where [uid]='" + auid + "'");
Session["uid"] = odb.scr("select uid from [admin] where [uid]='" + auid + "'"); ;
Response.Redirect("admin.aspx");
}
else
{
if (buid <= 0)
uid.Text = "用戶名錯誤";
if (bpwd <= 0)
uid.Text = uid.Text + " & 密碼錯誤";
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -