Create Event Receiver, open class file.
First add
this:
using System.Runtime.InteropServices;
Then add
this above class (use GUID Generator):
[Guid("567de298-a813-42ad-a639-26af24ad77b0")]
public class GoleszympansyEventReceiver : SPItemEventReceiver
Now, let's imagine you want to change class name or namespace. You'll have to change it also in Elements.xml.
But not anymore. Just insert this into elements.xml:
<Class>$SharePoint.Type.567de298-a813-42ad-a639-26af24ad77b0.FullName$</Class>
Guid here MUST be lower case. Just paste Guid from GUID Generator and then select it and press Ctrl+U.
Now the compiler will take care of the rest.
No comments:
Post a Comment