|
|
|
|
|
|
|
|
|
www.iwkid.com > Code Snippets
|
Code Snippets
|
|
|
|
|
|
|
Helpful IW Code Snippets
| | JavaScript | function FunctionName() { // Do something }
_spBodyOnLoadFunctionNames.push("FunctionName"); | | | | PowerShell | [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | | | | XSL | <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text> | | | | PowerShell | [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = New-Object Microsoft.SharePoint.SPSite($siteUrl) $web =$site.OpenWeb()
$scope = [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared $mgr = $web.GetLimitedWebPartManager($pageUrl, $scope)
$mgr.WebParts | Format-Table Title, WebBrowsableObject | | | | C# | SPSecurity.RunWithElevatedPrivileges(delegate() { // do something }); | | | | STSADM | stsadm -o setproperty -pn max-template-document-size -pv 40000000 | | | | XSL | <xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xmp><xsl:copy-of select="*"/></xmp> </xsl:template> </xsl:stylesheet> | Andy Burns |
|
|
|
|
|
|
 |
 |
 |
 |
|