How to programmatically get a Discussion Board's reply from a webpart for SharePoint 2010
I'm building a visua开发者_开发问答l 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?
Try:
SPQuery query = new SPQuery();
query.Folder = folder;
SPListItemCollection items = list.GetItems(query);
See also:
- How to find item count in a SPFolder?
- Traversing SharePoint List Folder Hierarchies
精彩评论