Tuesday, September 29, 2009

SharePoint List C# Part 1

Here I'm going to show you how you can use the SharePoint object model to read sharepoint list using C#.

To do this in your custom webpart or feature first you have to add the reference to Microsoft.Sharepoint.dll (Then in your code use "using Microsoft.Sharepoint;"). And also if you are going to run the program, you have to be in the server.

I'm trying to sync the data from the sharepoint to my SQL database. But somehow the GetListItems seems to break down. I'm using the "GetViewCollection" to get the "listID" and the "viewID". then I passed this 2 inside to my GetListItems.

Hi Saranga,Thanks for this post. I am new to sharepoint and your post on reading the list items helped me do things faster.One of my CAML queries should return more than 200 rows but because the view has some rowlimit and paging, I am getting only 100 rows. How do I read the next rows? Also my rs:data is like this...If this cud be of any help

I this is very helpful for me.Here my problem is " I have a pages library list and i want to archive those items based on month.Suppose for September month we have 10 entries.i have to display 5 items in home page and remaining in archive folder.pls tell how to write a code for this.it is very urgent for me....pls..