| Server IP : 199.79.62.161 / Your IP : 216.73.216.245 [ Web Server : Microsoft-IIS/10.0 System : Windows NT MDUS-PP-WB12 10.0 build 20348 (Windows Server 2022) AMD64 User : IWPD_5096(nirmaowd) ( 0) PHP Version : 8.3.30 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/INETPUB/VHOSTS/nirmalamatha.edu.in/ponnuguruvayurappan.org/Admin/ |
Upload File : |
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class admin_change_password : System.Web.UI.Page
{
ConnectionDB cd = new ConnectionDB();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnpass_Click(object sender, EventArgs e)
{
string changpass = "UPDATE [Admin] SET [Admin].[AdminPassword]='" + txt_NewPassword.Text + "' WHERE [Admin].[AdminUsername]='" + Session["AdminUsername"].ToString() + "' AND [Admin].[AdminPassword]='" + txt_OldPassword.Text + "'";
if (cd.Execute(changpass))
{
Response.Redirect("message.aspx?msg= Password Changed. New Password is: " + txt_NewPassword.Text);
}
else
{
Response.Redirect("message.aspx?msg=Invalid Attempt!");
}
}
}