温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:淘淘网电子商务网站源码(毕业设计)
当前文件:
TaoTaoBiz/Customer/UpdatePwd.aspx.cs[1K,2009-6-12 11:57:20],打开代码结构图
TaoTaoBiz/Customer/UpdatePwd.aspx.cs[1K,2009-6-12 11:57:20],打开代码结构图1using System; 2
using System.Collections; 3
using System.ComponentModel; 4
using System.Data; 5
using System.Drawing; 6
using System.Web; 7
using System.Web.SessionState; 8
using System.Web.UI; 9
using System.Web.UI.WebControls; 10
using System.Web.UI.HtmlControls; 11
using web.Code; 12
13
namespace web.Customer 14
{ 15
/// <summary> 16
/// update_pwd 的摘要说明。 17
/// </summary> 18
public partial class update_pwd : System.Web.UI.Page 19
{ 20
21
protected void Page_Load(object sender, System.EventArgs e) 22
{ 23
// 在此处放置用户代码以初始化页面 24
if(Session["LoginName"]==null) 25
{ 26
Response.Redirect("../Login.aspx?Return=" + Request.Url.ToString() ); 27
} 28
submitbn.Attributes.Add("onclick","return checkEmpty(pwd0)&&checkEmpty(pwd1)&&checkEmpty(pwd2);"); 29
} 30
31
Web 窗体设计器生成的代码 50
51
protected void submitbn_Click(object sender, System.EventArgs e) 52
{ 53
CustomerDAO customerDAO = new CustomerDAO(); 54
if(customerDAO.checkIsExist(Session["LoginName"].ToString(),pwd0.Text) != 0) 55
{ 56
customerDAO.updatePwd(Session["LoginName"].ToString(),pwd1.Text); 57
Response.Write("<script>alert('修改密码成功!')</script>"); 58
} 59
else 60
{ 61
Response.Write("<script>alert('初始密码错误!')</script>"); 62
} 63
} 64
} 65
} 66






}