D Infosystems
D Infosystems

Reputation: 524

how to Show confirmation msgbox when data is successfully inserted into database using detailsview in asp.net?

Show confirmation msgbox when data is successfully inserted into database using detailsview in asp.net ?

Upvotes: 1

Views: 949

Answers (1)

Aleksey Nemiro
Aleksey Nemiro

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

Related Questions