?? lpgin.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;
using System.Data.OleDb;
public partial class lpgin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string username = Request.Form["UserName"].ToString();
//string userpwd = Request.Form["UserPwd"].ToString();
string userpwd = Request.Form.Get("UserPwd").ToString();
OleDbConnection con = DB.creatConnection();
con.Open();
OleDbCommand cmd = new OleDbCommand("select * from UserTable where UserName='"+username+"' and UserPwd='"+userpwd+"'",con);
int count = Convert.ToInt32(cmd.ExecuteScalar());
if (count>0)
{
Response.Redirect("index.htm");
}
else
{
Response.Redirect("loginFile.aspx");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -