Article archive

Remove illegal characters from string

28/01/2014 15:46
//To use when creating site collection url from title  private static string CleanSiteTitle(string input)         {             string inputWithoutSpaces = Regex.Replace(input, " ", string.Empty);          ...

Create Content Database programmatically

28/01/2014 15:00
     string newDbName = "SP_Content_testSite1";                         int warningSiteCollectionNumber = 0;                         int...

Set master page for web

28/01/2014 14:58
$web = Get-SPWeb -identity $siteUrl $web.CustomMasterUrl = "/_catalogs/masterpage/yourMasterPageFile.master" $web.Update()

Import Web part with client object model

22/01/2014 16:22
Function call ImportWebPartToPage(webUrl, "/SitePages/Home.aspx", @"C:\Users\Administrator\Downloads\CEWP.dwp");    public static void ImportWebPartToPage(string webUrl, string pageUrl, string webpartFilePath)        ...

CSOM links

21/01/2014 12:00
C# - basic tasks https://msdn.microsoft.com/en-us/library/office/fp179912.aspx

Create sharepoint list

21/01/2014 11:57
static void Main(string[] args)         {             string listTitle = "My List";                         ClientContext context = new...

Get property in repeating table by index

17/01/2014 14:24
When you get Xnode dropdown value, you get index, not displayname in code behind.   Dropdown has following repeating table as datasource //Find display name by index in repeating table     private string FindAllowedUserDisplayNameByIndex(string...

Change list default view

09/01/2014 10:21
    #input parameters $webUrl = https://yoursitecollectionurl $listName = "MyList"   $web = get-spweb $webUrl $list = $web.Lists[$listName] $view = $list.DefaultView #important: Use Capitals when writing FALSE, False doesn't work $camlQuery =...

Activate InfoPath form on site collection

28/11/2013 15:44
#this script only activates form template already installed in Central Administration. Installing is described in another blog post (follow InfoPath tag)   $formTemplateFullName = "c:\temp\yourform.xsn" $siteUrl = https://server/yoursitecolectionurl   param($siteUrl,...

Upload InfoPath form template to Central Administration

28/11/2013 14:54
param($formTemplateFullName) $script:MyInvocation.MyCommand.Name   $AdminServiceName = "SPAdminV4" $WasAdminServiceRunning = $true   # Start SharePoint Administration Service if it's not already started. if ($(Get-Service $AdminServiceName).Status -eq "Stopped") {...
Items: 141 - 150 of 384
<< 13 | 14 | 15 | 16 | 17 >>