StringBuilder builder = new StringBuilder(); using (SPSite sitecol = new SPSite("http://rakesh-pc:13938/sites/aBIa1")) //here i am getting an error { SPWeb web = sitecol.OpenWeb(); SPList list = web.Lists["StoreDocument"]; if ((!list.IsApplicationList) && (list.OnQuickLaunch)) { if (list.Items.Count > 0) { // Display Library Name builder.Append("<h2>" + web.Title + " > " + list.Title + "</h2></br>"); foreach (SPListItem item in list.Items) { // Display File Name builder.Append(item.File.Name + " (" + (item.File.Length / 1024).ToString() + " KB) </br>"); //total += item.File.Length; } builder.Append("</br>"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)