[英]WSS 3.0 ItemAdded
我正在使用WSS 3.0,並嘗試使用ItemAdded-Event設置一些權限。 問題是,如果我添加項目,該事件不會觸發。 我搜索了整個網絡,卻一無所獲。 它僅在ItemAdding / ItemAdded上,但是我已經實現了一個ItemUpdating和ItemDeleting事件,它們運行完美! 有已知問題嗎?
這是我的事件(甚至沒有得到我的debugmessages .. :():
public override void ItemAdded(SPItemEventProperties properties)
{
Debug.WriteLine("ItemAdded started.");
PMDB_ContentType_Class pmClass = new PMDB_ContentType_Class();
pmClass.SetPermissions(properties);
Debug.WriteLine("ItemAdded ended.");
}
這是feature.xml
<?xml version="1.0" encoding="utf-8"?>
<Feature Id="34e2c6bd-0e9f-4a65-b280-3cd4c5ff5cb4" Title="PMDB_ContentType"
Scope="Site" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="PMDB_ContentType\PMDB_ContentType.xml" />
</ElementManifests>
</Feature>
1 >>我希望您已將事件正確附加到列表中Feature的FeatureActivated Event接收器中。 我無法檢查,因為您尚未發布該代碼。 請檢查該代碼中是否有任何錯誤。
2 >>使用Sharepoint Manager(http://spm.codeplex.com/releases/view/51438)查看您的事件是否正確附加到列表中。 如果不是,則嘗試從Web UI停用功能,然后再次將其重新激活。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.