Sharepoint Programming
Q) Retrieving information from linked lists in SharePoint using LINQ to SharePoint? using System.Linq; using Microsoft.SharePoint; using Microsoft.SharePoint.Linq; In the Page_Load method, add the following code: DataContext dc = new DataContext(SPContext.Current.Web.Url); var customers = dc.GetList < Customer > (“Customers”); var customerDataSource = from customer in customers select new {CustomerName = customer.Title, ContactLastName = customer.PrimaryContact.Title, ContactFirstName = customer.PrimaryContact. FirstName}; CustomerGridView.DataSource = customerDataSource; CustomerGridView.DataBind() Q)How you can retrieve the name of each folder in the top - level site of a site collection, as well as the number of subfolders that each folder contains? using System; using System.Text; using Microsoft.SharePoint; namespace Wrox.SixInOne { class Program { static void Main(string[] args) { StringBuilder folderName = new StringBuilder(); using (SPSite si...