开发者

SharePoint 2010, Save As Site Template And Event Reciever Feature

I have an event reciever feature on my SharePoint 2010 site where it runs when a survey is completed or is about to be deleted or updated. 开发者_JAVA技巧When I save my site as site template, the event reciever feature is activate before I perform the save. Now when I create a subsite using the site template that I just created, I notice my event reciever feature is called because I have code in the ItemUpdating event that displays an error message telling users that they can not edit a survey response, this message appears when I try to create the new subsite. Should I deactivate the feature before I save the site template?


Yes. The template will also contain the definition of event receivers that are registered when you save the template. If you deactivate your feature you remove those event receiver registrations, and so your template won't contain those receiver registrations.

It's one of the awkward things about creating site templates in 2010 - you've gott pay attention to what features are active.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜