Reputation: 524
Show confirmation msgbox when data is successfully inserted into database using detailsview in asp.net ?
Upvotes: 1
Views: 949
Reputation: 86
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>
Upvotes: 1