开发者

Getting path of the file that saved on Sharepoint Document library

Hoe开发者_如何学C to get the full path of the file that saved on into sharepoint document library. I have one requirement, in this if i upload one file to the document library, then i want to save the Doc path of the same to the DB. please help me to implement this task. Thanks in advance..


You can write some code to ItemAdded event handler and deploy it as a feature:

public override void ItemAdded(SPItemEventProperties pobjSPItemEventProperties)
{         
    using (SPWeb objSPWeb = pobjSPItemEventProperties.OpenWeb())
    {
        string strFileUrl = pobjSPItemEventProperties.ListItem.File.Url;
        //save to DB here
    }
}  
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜