Cari Blog Ini

06 September 2011

Code ASP.NET for Button Cancel

  Dim _intResponse As Integer

   Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click

        _intResponse = MessageBox.Show("Are you sure want to quit ?", Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
        If _intResponse = MsgBoxResult.Yes Then
            End
        Else
            Exit Sub
        End If

    End Sub