Adding Client-Side Message Boxes in your ASP.NET Web Pages

One of the useful features in a Windows desktop application that many programmers and end-users take for granted is message boxes. Two of the most common types of message boxes are alerts and confirms. A confirm message box prompts the user if they want to continue, and provides two choices: “OK” and “Cancel”. Clicking “OK” confirms the action, while “Cancel” cancels it.

Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If (Not Page.IsPostBack) Then
Me.BtnDelete.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")
End If
End Sub

http://aspnet.4guysfromrolla.com/articles/021104-1.aspx

http://www.dotnetjunkies.com

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *