I want to show a message box on the successful save of any item. I googled it and tried different solutions, but none of them worked. Here is the code I am 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();
}
(I am using Firefox, if that matters)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…