protected void Chgbtn_Click(object sender, EventArgs e)
{
if (newpsstxt.Text == "")
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Blank password not allow')", true);
}
else
{
using (MySqlConnection con = new MySqlConnection(constr))
{
MySqlCommand command = new MySqlCommand("UPDATE emplogin set psswd=@psswd where empno=@empno");
{
command.Parameters.AddWithValue("@psswd", newpsstxt2.Text);
command.Parameters.AddWithValue("@empno", empchglbl.Text);
command.Connection = con;
con.Open();
command.ExecuteNonQuery();
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Password Changed')", true);
con.Close();
}
}
if (IsPostBack)
{
newpsstxt.Text = "";
newpsstxt2.Text = "";
Panel1.Visible = false;
}
MultiView1.ActiveViewIndex = 0;
{
}
}
}