Show confirmation msgbox when data is successfully inserte开发者_StackOverflow社区d into database using detailsview in asp.net ?
ASP.NET has no available MsgBox. You can use alert from 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>
精彩评论