Create Datatable using .Net Client Context in SharePoint 2010

Create Data Table while using SharePoint 2010 Client Context with .Net Code I am using .net code to access SharePoint List.I created a method ExecuteSPQuery() which returns Data Table. For that I wrote below code. public static DataTable ExecuteSPQuery()     {         DataTable dtData = new DataTable();         Microsoft.SharePoint.Client.ListItemCollection listCollection = null;         ClientContext context = new ClientContext(“SITE_URL”);         try         {                        Site oWebsite = context.Site;             context.AuthenticationMode = ClientAuthenticationMode.Anonymous;             List list = … Read more

Display SharePoint List Items using ECMA Script – Client Object Model

Display SharePoint List Items using ECMA Script In this blog, I will explain, how to get list items using ECMA Script.ECMA script is a client side way to work with SharePoint object. Create a web part page in page library. Add a content editor web part on that page.In content editor webpart write below code: … Read more

Error – The user does not exist or is not unique SharePoint 2010

Currently I was doing some settings for super accountIn this context, I executed below command in powershell window. stsadm -o setproperty -propertyname portalsuperreaderaccount -propertyvalue account -url “<site-url>” But my site stops working and got below screen while access url with error message. “The user does not exist or is not unique SharePoint 2010“ So I … Read more

What is delegate control in SharePoint? Why to use it?

Delegate control in SharePoint allows developers to manage control on a master page without touching or editing master page. Actually, delegate control is associated with a feature. Whenever that feature is active delegate control will be visible and if an associated feature is de-active delegate control will not be visible to users. Create Delegate control … Read more

The method “GetItems” of the type “List” with id “{Guid}” is blocked by the administrator on the server.

I was working on SharePoint Client Context, and i was writing a piece of code to fetch items from SharePoint list. I got this error at this line:objContext.ExecuteQuery(); I solved this issue by executing powershell command.Open SharePoint Powershell  and type below command one by one. $webapp = Get-SPWebApplication “http://spserver”$webapp.ClientCallableSettings.AnonymousRestrictedTypes.Remove([microsoft.sharepoint.splist], “GetItems”)$webapp.Update()Open SharePoint Powershell  and type below command … Read more