SPQuery query = new SPQuery();
query.Query = string.Concat(
"<Where>",
"<Eq>",
"<FieldRef Name='IsRootPost'/>",
"<Value Type='Number'>1</Value>",
"</Eq>",
"</Where>",
"<OrderBy>",
"<FieldRef Name='DiscussionTitle' Ascending='TRUE' />",
"</OrderBy>");
query.ViewFields = "<FieldRef Name='DiscussionTitle' />";
query.ViewFieldsOnly = true;
SPListItemCollection _items = [MyList].GetItems(query);'
No comments:
Post a Comment