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)
Tranformation in Manufacturing
Do you want to know how CPG industry is undergoing transformation using IoT technology, read the blogs on how AWS partners are using AWS t...
-
Note : In below scenario jenkins was deployed in Linux container Scenario: Jenkins build failed with error. java.io.IOException: error...
-
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...
-
Error when installing NPM Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile. Fix: Run command and try a...
1 comment:
Thank you! I was going crazy looking for this.
Post a Comment