温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:彬彬Asp.net2.0留言板(Vs2005)源码
当前文件:
BinbinBook/book/login.aspx.cs[927B,2009-6-12 11:33:42],打开代码结构图
BinbinBook/book/login.aspx.cs[927B,2009-6-12 11:33:42],打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
12
public partial class login : System.Web.UI.Page 13
{ 14
//download from 51aspx.com 15
protected void Page_Load(object sender, EventArgs e) 16
{ 17
18
} 19
protected void Button1_Click(object sender, EventArgs e) 20
{ 21
string login_name=ConfigurationSettings.AppSettings["login_name"]; 22
string pwd = ConfigurationSettings.AppSettings["pwd"]; 23
if(login_name==this.TextBox1.Text&&pwd==this.TextBox2.Text) 24
{ 25
Session["admin"] = "binbin"; 26
Response.Redirect("index.aspx"); 27
} 28
else 29
{ 30
Response.Redirect("login.aspx"); 31
} 32
33
} 34
} 35






}
}