Reputation: 4740
I'm building a visual webpart for SharePoint 2010 and I need to get a reply from a Discussion Board programmatically (asp.net).
Because I get the folder Discussion 1 (inside a Discussion Board, let's say) and then I want to browse its files but I get files.count = 0
, while I perfectly get the Document Library's files using that code.
Any ideas?
Upvotes: 1
Views: 2380
Reputation: 10335
Try:
SPQuery query = new SPQuery();
query.Folder = folder;
SPListItemCollection items = list.GetItems(query);
See also:
Upvotes: 2