无法在代码中实例化共享点列表 [英] Cannot instantiate sharepoint list in code

查看:107
本文介绍了无法在代码中实例化共享点列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好.在sharepoint 2010中,我的任务是使用事件接收器自动修改列表内容:
创建订户列表,并通知何时将新元素添加到另一个列表(例如文章)

Hello. in sharepoint 2010 my task is to use event receiver to automatically modify list content:
Create a list of subscribers and notifying about when new element is added to another list (say Articles)

我已经创建了网站列表"Articles",和订户".同样在我的程序包中,我创建了一个称为TestArticles的事件接收器,在该事件接收器中我想实例化这些列表,并使用观察者模式将它们附加到另一个列表中.但是,当我 想要将私有成员添加到我的事件接收器类中,所以看不到Article实体.我需要手动添加部件吗?由于此消息,我无法添加代码和项目结构的图像:

I have created site lists "Articles" and "Subscribers". Also in my package I have created event receiver called TestArticles, in which i want to instantiate those lists and attach one to another using observer pattern. However, when I want to add a private member to my Event Receiver class, it doesn't see the Article entity. Do i need to add an assembly manually? I cannot add image of my code and project structure because of this message :

  • 在我们能够验证您的帐户之前,正文文本不能包含图像或链接.
  • Body text cannot contain images or links until we are able to verify your account.

但是错误只是说找不到类型或名称空间名称'Article'".
谢谢

But error just says "The type or namespace name 'Article' could not be found".
thanks

推荐答案

请检查事件接收器项目中是否具有Article类.您需要创建Article类并在事件接收器类中使用.

Please check if you have the Article class in the event receiver project. You need create the Article class and use in event receiver class.

我建议您将图像发布到OneDrive中,并在回复中以文本形式共享链接,以供进一步研究.

I suggest you post your images in to OneDrive and share the link as text in the reply for further research.

最好的问候,

丹尼斯


这篇关于无法在代码中实例化共享点列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆