.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Display sharepoint Items as you want

Posted By:Sagar Pardeshi       Posted Date: February 09, 2011    Points: 15    Category: SharePoint    URL: http://www.dotnetspark.com  

Display sharepoint List Items as you want


String Items;

SPSite Site = SPContext.Current.Site();


using (SPWeb Web = Site.OpenWeb())


            SPList List = Web.Lists["First"];

            SPView View = List.Views["All Items"];

            SPListItemCollection ItemCollection;

            ItemCollection = List.GetItems(View);      

            for (int i=0; i < ItemCollection; i++)


                        Items = ItemCollection[i]["Title"];


            //Display Items as you want.



Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend