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)
Reference Architecture: Building a Cost Optimized, High-Throughput HL7, EDI, and FHIR Processing Pipeline on OCI ( Published in Oracle Blog)
OCI (Oracle Cloud Infrastructure) provides more than 200 services to build your next enterprise application. Explore the blog to learn how ...
-
Ever wanted to have a people picker kind of control in Infopath form and that too in browser mode. Did i heard yes :) , well there is a Acti...
-
Am sure lot's of people would be wondering how to hide menu items of a list eg document libraries "Send to " menu item . In o...
-
I got this error for quite some time and i had no clue what was wrong in my page . Page consisted of only 2 panel controls . That's all ...
1 comment:
Thank you! I was going crazy looking for this.
Post a Comment