Skip to main content

Posts

Showing posts from February, 2013

SharePoint 2013 and SharePoint 2010 Delegate Controls

SharePoint Delegate control is a mechanism that we can inject a code or control to the SharePoint Master page with out touching any any code in the SharePoint Master page. “ is a container type control which can holds child controls on it “ This is the simplest explanation for the SharePoint delegate controls but this also may confuse to you. So let me further simplify. SharePoint Master Page design in a way that leaving place holders( Not a place holder really but for get an idea ) to some controls (Delegate Controls) that has a machinist to inject. Assume this is our SharePoint Master page. The Red Rectangle (SmallSearchInputBox) is a delegate control. It means the textbox and other functionalities in that search box not written in the  master page. Master page just have a place holder with id SmallSearchInputBox and which is going to dynamically replace by search box in the run time. Master Page code is just look like this. There are few delegate controls defined in t

Apps for SharePoint 2013 @ SharePoint Forum

Apps for SharePoint from Melick Baranasooriya

How to use SharePoint Emulator to test SharePoint list creation,Update

Open the visual studio 2012 and add empty SharePoint project.   Then create the project as farm solution by giving the testing SharePoint server URL (you can give sandbox solution as per your requirement) Then I'm going to add a feature ; which is going to create a SharePoint list in feature activation. (adding a feature receiver to the feature) Now I'm going to add a class (SPController.cs) which is used in Feature Activation event for creating the list in the SharePoint. SPController class having a method called AddListSample() that is use for create a list in the SharePoint. public class SPController { public void AddListSample(String siteURL, String listName, String description) { using (SPSite site = new SPSite(siteURL)) { using (SPWeb web = site.OpenWeb()) { Guid listguide = web.Lists.Add(listName, description, SPListTemplateType.GenericList);

Could not load file or assembly 'System.Web.2.0.0.0.Fakes

  Test method VisualWebPartProject1Test.SPControllerTest.CreateListTest threw exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.2.0.0.0.Fakes, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0ae41878053f6703' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. Result StackTrace This error occurred to me when i try to test a SharePoint emulator with a test project.I tried in many ways and it is a simple code; but i wonder why it is  giving this error. i but the dlls to bin and did various things but nothing worked for me. then what i did was 1. First Uninstall the existing emu