I've been trying to display a message box after successfully saving an item, but the solutions I found online haven't worked for me. Below is the code I'm currently using:
try
{
con.Open();
string pass="abc";
cmd = new SqlCommand("insert into register values('" +
txtName.Text + "','" +
txtEmail.Text + "','" +
txtPhoneNumber.Text + "','" +
ddlUserType.SelectedText + "','" +
pass + "')", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<script LANGUAGE='JavaScript' >alert('Login Successful')</script>");
}
catch (Exception ex)
{
}
finally
{
con.Close();
}
(Using Firefox browser)