文件操作 - ChangePassword.aspx.cs
返回文件管理
返回主菜单
删除本文件
文件: E:\HostingSpaces\kimblycr\guard.kimbly.in\wwwroot\Account\ChangePassword.aspx.cs
编辑文件内容
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Account_ChangePassword : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { Response.Redirect("Login.aspx"); } } protected void BtnSubmit_Click(object sender, EventArgs e) { if (txtNewPwd.Text != txtConfirm.Text) { General.Utilities.message("New password doesnot match with confirm password"); } else { string un = Session["user"].ToString(); string ps = txtOldPwd.Text; int i = General.Utilities.login_check(un, ps, "LoginCheck"); if (i == -2) { General.Utilities.message("Wrong old password"); } else { //change password UpdateClass upd = new UpdateClass(); upd.UpdPassword(un,ps); Response.Redirect("~/login.aspx"); } } } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件