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 login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string OleDbchk = "select count(*) from user_info where userName='" + this.a_uid.Text + "' and userPwd='" + this.a_pwd.Text + "'";
        OleDbConnection conn = DB.connstr();
        conn.Open();
        OleDbCommand cmd = new OleDbCommand(OleDbchk, conn);
        int i = Convert.ToInt32(cmd.ExecuteScalar());
        if (i > 0)
        {
            Session["user"] = this.a_uid.Text;
            Response.Redirect("userinfo.aspx");
        }
        else
        {
            this.Label3.Text = "用户名或密码输入有误，请重新输入！";
        }

    }
}
