How to display mesages fom sharepoint list event receiver


I have a sharepoint webpart page showing the list content on it.

at the background on the list ItemAdded/ItemUpdated I am doing some sort of operations.

Is there is any way to show the error messages/status to the user on the sharepoint page.

I am not able to get the server side messages to the client side(on SharePoint Page).

Please help on this.

May 28th, 2015 9:49am


 did you try to use

   properties.ErrorMessage = "your message";
           properties.Status = SPEventReceiverStatus.CancelWithError;
           properties.Cancel = true;

Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 9:53am

Hi Rajendra,

Thanks for your inputs,

actually we are trying out this on sharepoint 2007, and on SP 2007 we are not able to get properties.redirectUrl property.

is there any other way for SP 2007 ?

May 29th, 2015 2:53am


you can set 

properties.ErrorMessage = "Deleting not supported!"
    properties.Cancel = True

in moss 2007 .

Create your custom error page with the general message and redirect using SPUtilty.Redirect

here is the blog for the same.

May 29th, 2015 3:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics