Also, you are in SP 2007 able to cancel an event if you have the need for it, hence providing the user with an error message in the browser.
With Share Point 2007 you had no way to this error message, and could only display the out-of-the-box message.
Apparently I didn’t do any fancy design on my Application Page, but you can add more images and whatever else you want to make it more easy for the users to understand what actually went wrong – and how to make it on from there.
As easy as 1-2-3, you’ve created a new event receiver in Share Point 2010 – and created a Custom Error Page upon which your users will land when they’re presented with the error – something that wasn’t really possible in 2007.
Currently we don’t cancel the event or do anything else – let’s leave that to your imagination.
So – now that we’ve got a As you can see, your custom HTML now appears.
In the Event Receiver1file that you’re presented with, you can quite easily add any code you want – and some code has already been added so you don’t have to!
The code looks like this out of the box: Now, what I want to do in order to make sure my event receiver works – is to simply add some dummy-code and have it tested!
So, in this article I will walk you through the news with Event Receivers in SP 2010 in regards to creating custom Error Pages for your users.I chose "List Item Events", "Announcements" and "An item is being added": Click next and let Visual Studio 2010 work it’s magic.You’re presented with the following project structure that is created for us: I will not dig deep on how and why the structure of the project looks the way it does now – it will be covered in another article.In my case I was changing the value of a custom property named CMIs Secret, so if that property was the same in before Properties as in after Properties (the values before and after the save) I should go on with the update, otherwise not.This was the method I created: It checks if the property exists at all (it doesn’t if it is an Item Added-event and the property is custom made) and if it differs.