View FileCheck.cs
using System; | |
using System.IO; | |
using System.Text; | |
namespace Example | |
{ | |
public class FileCheck | |
{ | |
/// <summary> | |
/// Determines whether the specified file stream is a valid PDF. |
View CustomUnobtrusiveValidator.cshtml
@{ | |
ViewBag.Title = "Contact"; | |
} | |
<h2>@ViewBag.Title.</h2> | |
<h3>@ViewBag.Message</h3> | |
@using (Html.BeginForm()) | |
{ | |
<input type="hidden" class="include-validation" name="test" data-val="true" data-val-requiredoptout="verplicht veld" | |
data-val-requiredoptout-optoutfieldselector="#testcheck" data-val-requiredoptout-requiredfieldselector="#test2" /> |
View AddDependentLookup.cs
private void AddDependantLookup(List parentList, List targetList, Guid lookupFieldId, Field primaryLookupField, string displayName) | |
{ | |
Field toField = parentList.Fields.GetById(lookupFieldId); | |
_clientContext.Load(toField); | |
_clientContext.Load(targetList); | |
_clientContext.ExecuteQuery(); | |
Field dependantField = targetList.Fields.AddDependentLookup(displayName, primaryLookupField, | |
toField.StaticName); | |
FieldLookup dependantFieldLookup = _clientContext.CastTo<FieldLookup>(dependantField); | |
dependantFieldLookup.LookupField = toField.StaticName; |
View UpdateWebPartTitles.cs
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.WebParts; | |
namespace UpdateWebPartTitles | |
{ |
View Execute-Tests.ps1
Import-Module .\Tests\TestModule.psm1 | |
Start-Tests -testContainer C:\Example\Tests |