What are the steps required in attaching an event receiver to a custom list in sharepoint?
将事件接收器附加到sharepoint中的自定义列表需要执行哪些步骤?
3 个解决方案
#1
This can be done in at least two different ways:
这可以通过至少两种不同的方式完成:
- Create a feature that upon feature activation you have the proper code to attach to a specific list (use this URL for some help)
- Or you could have a console application that will have code to attach to a specific list (again using the same code as in the URL mentioned above)
创建一个功能,在功能激活后,您可以使用正确的代码附加到特定列表(使用此URL获取一些帮助)
或者您可以拥有一个控制台应用程序,该应用程序将具有附加到特定列表的代码(再次使用与上述URL中相同的代码)
For further help go here.
如需进一步帮助,请点击此
#2
There are several ways to attach EventReceivers to lists, ContentTypes or sites. Take a look at Brian Wilson's blog post about this topic and describes several ways to do this.
有几种方法可以将EventReceivers附加到列表,ContentTypes或站点。看看Brian Wilson关于这个主题的博客文章,并介绍了几种方法。
He also developed a SharePoint Feature which deploys a configuration page where you can attach and delete EventReceivers over an UI.
他还开发了一个SharePoint功能,该功能部署了一个配置页面,您可以在UI上附加和删除EventReceivers。
#3
you may go to element file and edit the tag Receivers, change the value of the attribut ListUrl to whatever is your URL for instance if your list is called Customers, insert <Receivers ListUrl="Lists/Customers">
Try this and good luck
您可以转到元素文件并编辑标签Receivers,如果您的列表名为Customers,则将attribut ListUrl的值更改为您的URL,插入
#1
This can be done in at least two different ways:
这可以通过至少两种不同的方式完成:
- Create a feature that upon feature activation you have the proper code to attach to a specific list (use this URL for some help)
- Or you could have a console application that will have code to attach to a specific list (again using the same code as in the URL mentioned above)
创建一个功能,在功能激活后,您可以使用正确的代码附加到特定列表(使用此URL获取一些帮助)
或者您可以拥有一个控制台应用程序,该应用程序将具有附加到特定列表的代码(再次使用与上述URL中相同的代码)
For further help go here.
如需进一步帮助,请点击此
#2
There are several ways to attach EventReceivers to lists, ContentTypes or sites. Take a look at Brian Wilson's blog post about this topic and describes several ways to do this.
有几种方法可以将EventReceivers附加到列表,ContentTypes或站点。看看Brian Wilson关于这个主题的博客文章,并介绍了几种方法。
He also developed a SharePoint Feature which deploys a configuration page where you can attach and delete EventReceivers over an UI.
他还开发了一个SharePoint功能,该功能部署了一个配置页面,您可以在UI上附加和删除EventReceivers。
#3
you may go to element file and edit the tag Receivers, change the value of the attribut ListUrl to whatever is your URL for instance if your list is called Customers, insert <Receivers ListUrl="Lists/Customers">
Try this and good luck
您可以转到元素文件并编辑标签Receivers,如果您的列表名为Customers,则将attribut ListUrl的值更改为您的URL,插入