Solved

i want to find newly added 3 items in sharepoint list using object model ?

Posted on 2011-09-08
3
213 Views
Last Modified: 2012-05-12
Hi Experts,

i want to find newly added 3 items in sharepoint list using object model.
0
Comment
Question by:ramuar1981
3 Comments
 
LVL 8

Expert Comment

by:vsudip
ID: 36501604
0
 
LVL 6

Author Comment

by:ramuar1981
ID: 36501854
i want to display newly added items in sharepoint list.
0
 
LVL 18

Accepted Solution

by:
ivan_vagunin earned 500 total points
ID: 36512770
Hi!

You can find new items using SPQuery:

SPList myList = SPContext.Current.Web.Lists["My list"];
SPQuery query = new SPQuery();
query.Query = "<OrderBy><FieldRef Name='Created' Ascending='FALSE' /></OrderBy>";
query.RowLimit = 3;
SPListItemCollection items = myList.GetItems(query);
foreach(SPListItem item in items)
{
    //show item
}
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now