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)
((我正在使用Firefox,如果这很重要))
ask by Freelancer translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…