protected void onupdateclick(object sender, EventArgs e) { string newpass = TextBox3.Text.ToString(); string uname = Session["Admin"].ToString(); if (bl.updateadprofile(uname, newpass) == true) { Page.ClientScript.RegisterStartupScript(this.GetType(), "hwe", "setSuccessFor('Profile Updated Successfully',1);", true); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "hwe", "setSuccessFor('Password must be more than 3 Characters',2);", true); } }