protected void btnUpdate_Click(object sender, EventArgs e) { if (this.Page.IsValid) { string text = this.txtUserName.Text; string password = this.txtPassword.Text; User user = new User(); if (!user.SetPassword(text, password)) { this.lblMsg.ForeColor = Color.Red; this.lblMsg.Text = SysManage.TooltipUpdateFail; } else { this.lblMsg.ForeColor = Color.Blue; this.lblMsg.Text = SysManage.TooltipUpdateSucceed; } } }