www.pudn.com > flash-zhibo-yuanma.rar > Admin_Login.aspx.cs, change:2007-09-25,size:1511b


using System; 
using System.Collections; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Web; 
using System.Web.SessionState; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.HtmlControls; 
 
namespace admin 
{ 
	/// <summary> 
	/// Admin_Login 的摘要说明。 
	/// </summary> 
	public partial class Admin_Login : System.Web.UI.Page 
	{ 
	 
		protected void Page_Load(object sender, System.EventArgs e) 
		{ 
			// 在此处放置用户代码以初始化页面 
		} 
 
	 
        protected void Submit1_ServerClick(object sender, EventArgs e) 
        { 
            string usn, pwd, vstr; 
            usn = Request.Form["UserName"]; 
            pwd = Sp.Functions.Tosql(Request.Form["Password"]); 
            vstr = Sp.Functions.Tosql(Request.Form["vnumber"]); 
            //Response.Write(vstr.CompareTo(Session["Vnumber"].ToString())); 
            if (vstr.CompareTo(Session["Vnumber"].ToString()) == 1) 
            { 
                MessageBox.Show(this, "您输入的验证码不正确,请重新输入!"); 
                return; 
            } 
            Sp.login lo = new Sp.login(); 
            lo.usn = usn; 
            lo.pwd = pwd; 
            string sid=lo.adminlo(); 
            //Response.Write(sid); 
            //return; 
            if (sid == "1") 
            { MessageBox.ResponseScript("top.location.href='Default.aspx'"); } 
            else 
            {  MessageBox.Show(this, "您输入的密码不正确,请重新输入!"); } 
        } 
} 
}