开发者

Sharepoint 2010. Api. How to get field history?

I have SPListItem and some text field. I need in code get all versions of this field EX:

  1. version 1 "hello rorld"
  2. version 2 "hello world"
  3. version 3 "new application"
开发者_StackOverflow

Any examples how to do that?


Try this:

foreach (SPListItemVersion version in item.Versions)
{
    Console.WriteLine(string.Format(
        "{0}. version {0} \"{1}\"", 
        version.VersionId, version["this field"]));
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜