⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userchangepwd.aspx.cs

📁 校友管理系统(可以通过excel导入和导出校友信息)
💻 CS
字号:
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 UserInfoManage
{
	/// <summary>
	/// Summary description for UserChangePwd.
	/// </summary>
	public class UserChangePwd : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.TextBox txtNewPwd1075;
		protected System.Web.UI.WebControls.RequiredFieldValidator RequiredPwdValidator1075;
		protected System.Web.UI.WebControls.TextBox txtNewPwd2075;
		protected System.Web.UI.WebControls.RequiredFieldValidator RequiredPwdValidator2075;
		protected System.Web.UI.WebControls.Button btnOK075;
		protected System.Web.UI.WebControls.ValidationSummary ValidationSummary075;
		protected System.Web.UI.WebControls.CompareValidator CompareValidator1075;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.btnOK075.Click += new System.EventHandler(this.btnOK075_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void btnOK075_Click(object sender, System.EventArgs e)
		{
			string name=(string)this.Session["username"];
			System.Data.OleDb.OleDbDataAdapter adpt=(System.Data.OleDb.OleDbDataAdapter)this.Session["adpt"];
			adpt.SelectCommand.CommandText="select * from userinfo where name='"+name+"'";
			DataSet ds=new DataSet();			
			adpt.Fill(ds);
			DataTable dt=ds.Tables["userinfo"];
			DataRow row=dt.Rows[0];
			row["password"]=this.Request.Form["txtNewPwd1075"];
			adpt.Update(ds);
			this.Server.Transfer("UserPage.aspx");
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -