This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
// accesses a control by ID (i.e. a checkbox/button/textbox etc) | |
private static Control FindControlIterative(Control root, string id) | |
{ | |
Control ctl = root; | |
LinkedList<Control> ctls = new LinkedList<Control>(); | |
while (ctl != null) | |
{ | |
if (ctl.ID == id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### ABOUT ##### | |
# This script updates the mobile number and work number values | |
# for all users in the "User Information List" for all site collections | |
# in the specified web application (see variables below) | |
##### VARIABLES ##### | |
$webAppURL = "http://mywebapp" | |
$logPath = "C:\temp\UpdateUserInfo\UpdateUserInfo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Reflection; | |
using LS.Extensions; | |
using Properties; | |
namespace Properties | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Web.UI; | |
using System.Xml; // requires System.Xml reference | |
using System.Xml.Linq; // requires System.Xml.Linq reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// replacement function for console.log(), which avoids 'undefined' exception in IE 8 | |
window.LogMsg = function (msg) { | |
if (window.console) { | |
console.log(msg); | |
} | |
}; | |
// set up root namespaces | |
window.LS = window.LS || {}; | |
LS.AJAXFrames = LS.AJAXFrames || {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$siteUrl = "http://site/collection/url" | |
$fieldPrefix = "ClientName_" | |
$outputPath = "c:\temp\Fields.cs" | |
$site = Get-SPSite $siteUrl | |
$fields = $site.RootWeb.Fields | |
$output = "" | |
$newLine = "`r`n" | |
$tab = "`t" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var nsName = "LS"; // root namespace name | |
var ns = window[nsName]; // root namespace alias | |
var utils = ns.Utils; // utils alias | |
ns.SP = ns.SP || {}; | |
ns.SP.JSOM = { | |
Data: { | |
Sites: {} // cache for Taxonomy terms JSON | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--ASP.NET--> | |
<asp:Textbox runat="server" ClientIdMode="Static" type="password" id="PasswordTextbox" name="PasswordTextbox" pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).{8,}$" validationmessage="Please enter a password which is at least 8 characters long and contains a lowercase character, an uppercase character and a number" required /> | |
<!--HTML--> | |
<input type="password" id="PasswordTextbox" name="PasswordTextbox" pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).{8,}$" validationmessage="Please enter a password which is at least 8 characters long and contains a lowercase character, an uppercase character and a number" required /> | |
<!--Kendo UI Validator: http://demos.telerik.com/kendo-ui/validator/index --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define a global function to execute | |
function $_global_onMDSPageLoad() { | |
// code to execute on page load goes here | |
} | |
ExecuteOrDelayUntilScriptLoaded(function () { | |
if (typeof asyncDeltaManager != "undefined") | |
asyncDeltaManager.add_pageLoaded($_global_onMDSPageLoad); // execute on MDS page load | |
else | |
$_global_onMDSPageLoad(); // execute on non-MDS page load |
OlderNewer