Eventreciever – replace ListTemplateId with ListUrl and add the URL of the list instance


Eventreciever – replace ListTemplateId with ListUrl and add the URL of the list instance

In Solution Explorer, under EventReceiver1, double-click Elements.xml to open it.

The event receiver currently references the Announcements list definition by using the line

<Receivers ListTemplateId="104">

Change this line to

<Receivers ListUrl="Lists/TestAnnouncements">

This directs the event receiver to respond only to events that occur in the new TestAnnouncements announcements list that you just created. You can change the ListURL attribute to reference any list instance on the SharePoint server.

Advertisements

About sharepointsriram

9+ Yrs of IT experience
This entry was posted in Sharepoint 2010 Lists , Libraries & Event Receivers. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s