2015-08-17 19 views

回答

0

你只是顯示的版本或應該onclick帶你到相同的版本?請看下面的代碼片段

`using (SPSite site = new SPSite("http://Mysite")) 
{ 
using (SPWeb web = site.OpenWeb()) 
{ 
SPList docs = web.Lists["TestDocLibrary"]; 
foreach (SPFile file in docs.RootFolder.Files) 
{ 
Console.WriteLine("File Name/URL:- {0} has next version {1}. Version  History:", file.Url, file.UIVersionLabel); 
foreach (SPFileVersion v in file.Versions.Cast().Reverse()) 
{ 
Console.WriteLine("Version of the file :- {0} time of checkin :- {1} comments while checking in:- '{2}'", v.VersionLabel, v.Created, v.CheckInComment); 
} 
} 
} 
}` 
+0

謝謝你的建議!但我使用沙盒解決方案。我放棄了這個問題。無論如何,謝謝! –

相關問題