开发者

Problem with event receiver in visual studio 2010

开发者 https://www.devze.com 2022-12-28 09:01 出处:网络
I am trying to figure out how to get the title of a list item from the ba开发者_Go百科se.ItemAdding(properties);

I am trying to figure out how to get the title of a list item from the ba开发者_Go百科se.ItemAdding(properties); I know it's somewhere in properties, because what I want to do is copy the item that was just added to another list, meaning that the same item will be added to another list, can anyone help me get the the value of the fields from the item that was just added, such as title, description, ...

Thanks already.


Hey - in the future if you are using the ItemAdding event - you can access properties from the AfterProperties collection

public override void ItemAdding(SPItemEventProperties properties)
       {

           String title = properties.AfterProperties["Title"].ToString();
0

精彩评论

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

关注公众号