I found this useful so I will update it.For SharePoint 2013:
properties.Cancel is now depreciated. Use, use Status instead. Options for status are:
CancelNoError
Continue
CancelWithError
CancelWithRedirectUrl(Obsolete - Default list forms are committed through asynchronous XmlHttpRequests, so redirect urls specified in this way aren't followed by default.)
- CancelNoError
- Continue
- CancelWithError
- CancelWithRedirectUrl (Obsolete - Default list forms are committed through asynchronous XmlHttpRequests, so redirect urls specified in this way aren't followed by default.)
Example:
properties.ErrorMessage = "My error message";
properties.Status = SPEventReceiverStatus.CancelWithError;