SPWeb oSpWeb = SPContext.Current.Web;
SPFolder oSPF = oSpWeb.Lists["Shared Documents"].RootFolder;
foreach (SPFile oSPfile in oSPF.Files)
{
if (oSPfile.CheckOutType == SPFile.SPCheckOutType.None)
{
LiteralControl ltc= new LiteralControl(string.Format("
File {0} : {1} : {2}", oSPfile.Name,"Not Checked Out", oSPfile.CheckInComment));
this.Controls.Add(ltc);
}
else
{
LiteralControl ltc= new LiteralControl(string.Format("
File {0} : {1} : {2}", oSPfile.Name,"Checked Out", oSPfile.CheckInComment));
this.Controls.Add(ltc);
}
}
No comments:
Post a Comment