If you are trying to retrieve all the root items of the Discussion List this way , it's not going to work :
SPSite site = new SPSite("Site URL");
SPWeb web = site.OpenWeb();
SPList list1 = web.Lists["DiscussionListName"];
SPListItemCollection coll = list1.Items ;
Well Here is the right way of doing it :-)
SPSite site = new SPSite("Site URL");
SPWeb web = site.OpenWeb();
SPList list1 = web.Lists["DiscussionListName"];
SPListItemCollection coll =list1.Folders ;
Subscribe to:
Post Comments (Atom)
Gray Failures: What is it and how to detect one?
If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures. Hopefu...
-
Note : In below scenario jenkins was deployed in Linux container Scenario: Jenkins build failed with error. java.io.IOException: error...
-
SharePoint Capacity Planning Tool on Microsoft Download Center: http://go.microsoft.com/fwlink/?LinkID=93029 System Center Capacity Planner:...
-
Simple concept but still pain in head if unable to figure out :) Response.Redirect("#");
1 comment:
Thank you! I was going crazy looking for this.
Post a Comment