Wednesday, August 8, 2012

Get the data of updated items fom document library in sharepoint

In this post i will given a query to get the last updated items in Document library in share point 2010.We can do this task in two ways.One is using ViewXML property and other one is using  query property.The main difference between query and ViewXML is "The view XML contains view fields,Query etc but the query does not".Here i used ViewXml property  to define the query.

SPQuery resque = new SPQuery();
resque.ViewXml = "<View><Query><OrderBy><FieldRef Name='Modified'/></OrderBy></Query><RowLimit>50</RowLimit></View>";
Post a Comment

Bel