i have a winform with a button cmdSave with the property
i want that when te user clicks the cmdSave button, a messagebox to appear ask him if he wants to continue, and if the answer is yes, the save process can go ahead, else the object shouldn't be saved.
i tried
the problem is that when i click no, the object is anyway saved,i also tried the method CslaActionExtender1_ObjectSaving but still no result,the object is saved anyway.
thanks a lot for your time and attention, any kind of suggestion would be very helpful
Me.CslaActionExtender1.SetActionType(Me.cmdSave, Csla.Windows.CslaFormAction.Save)
i want that when te user clicks the cmdSave button, a messagebox to appear ask him if he wants to continue, and if the answer is yes, the save process can go ahead, else the object shouldn't be saved.
i tried
Private Sub CmdSaveClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click Dim result = MessageBox.Show("Some question", MessageBoxButtons.YesNo) If result = DialogResult.Yes Then bcloneBeforeSaving = False bButtonclicked = cmdSave ElseIf result = DialogResult.No Then Exit Sub End If End Sub
the problem is that when i click no, the object is anyway saved,i also tried the method CslaActionExtender1_ObjectSaving but still no result,the object is saved anyway.
thanks a lot for your time and attention, any kind of suggestion would be very helpful