I am trying to figure out how to cancel the click event from code behind as I don't want my page to post back. I can't seem to find this anywhere. If I were to use a standard asp button I would just use the e.Cancel = True. Thanks in advance.
Hi,
Thank you for using our forum.
You want to cancel the event you have to return false or to set e.Cancel=True.
In which control you are trying to cancel click event?
Nadia,
Thanks for the quick response. I am using the WebImageButton. I will attach some code that I am using as the code doesn't recognize the cancel method of the e object.
Private Sub cmdSave_Click(sender As Object, e As Infragistics.WebUI.WebDataInput.ButtonEventArgs) Handles cmdSave.ClickIf UpdateRecord() Then MsgBox("Record is saved.", MsgBoxStyle.OkOnly, "Record Saved")Else e.cancel = True End IfEnd Sub