SharePoint Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 2585 Page Views: 

Write code in C# to fetch all the data from SharePoint Custom List?



Posted By: Avi Date: 18 November 2009 06:35:44 AM
 Answer:

SPSite objSite = new SPSite("http://servername:1234");
SPWeb objWeb = objSite.OpenWeb();
SPList objList = objWeb.Lists["ListName"];
DataTable objDT = objList.Items.GetDataTable()


Posted By: eTechPlanet


Date: 18 November 2009 06:35:44 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image KW268O
Related Questions
SharePoint : What are the major benefits of Microsoft Office SharePoint Server 2007?

What are the major benefits of Microsoft Office SharePoint Server 2007?

1) Office SharePoint Server 2007 provides a single integrated platform to manage intranet, extranet....
Category: SharePoint Date: 5/10/2010 11:59:09 AM
SharePoint : what are the different farms used in the windows workflow foundation to deployed sharepoint?
SharePoint : where are the different file to content query webpart? To design a page?

where are the different file to content query webpart? To design a page?

content query webpart displays a dynamic view of sites ,pages
Category: SharePoint Date: 4/21/2010 10:06:49 PM
SharePoint : How do I connect database  and infopath in sharepoint?

How do I connect database and infopath in sharepoint?

\\.\pipe\mssql$microsoft## ssee\sql\query (for Sharepoint 2007) or \\.\pipe\mssql$sharepoint\sql\que....
Category: SharePoint Date: 4/21/2010 10:06:16 PM
SharePoint : how do I import datagrid in sharepoint through webparts?