使用asp.net中的详细信息视图将数据成功插入数据库时显示确认消息框?
答案 0 :(得分:1)
ASP.NET没有可用的MsgBox。您可以使用JavaScript提醒。
Page.ClientScript.RegisterStartupScript(Me.GetType(), "MyScript", "alert('successfully!');", True)
for ItemCreated:
Protected Sub DetailsView1_ItemCreated(ByVal sender As Object, ByVal e As EventArgs) Page.ClientScript.RegisterStartupScript(Me.GetType(), "MyScript", "alert('successfully!');", True) End Sub
<asp:detailsview id="DetailsView1" ... onitemcreated="DetailsView1_ItemCreated" runat="server"></asp:detailsview>