-
Function.createDelegate
function greet(message) { alert(message + ", " + this.name); } -
Function.createCallback
var createCallback = function(method, context) { return function() { //the arguements is passed in when the this callback //method is call //if there is parameter passed //package the parameter with the context //into an array, an invoke the callback //method with the array var l = arguments.length; if (l > 0) { var args = []; for (var i = 0; i < l; i++) { args[i] = arguments[i]; } //the last array member is the //the context args[l] = context; -
Create a SharePoint Solution
SharePoint use solution file to deploy solution. There are some tools to create a solution file automatically, like stsdev. But it still important to understand how the solution deployment works
-
ContentPlaceHolder trick
- ContentPlaceHolder in master page is reference in Content control in content page
- Content control's Id can be empty, but the ContentPlaceHolderID need to be filled. The position of Content control in content page does not matter.
- In ContentPlaceHolder, you can fill in some default content. But they will be override once content page reference it.
-
Global Site Definition
The Global site definition is located at the 12\TEMPLATES\GLOBAL path. It contains the standard default.master page template along with instructions to provision an instance of default.master page into the Master Page gallery of every new site. The Global site definition also contains provisioning logic to create the following four site collection–scoped lists in every new top-level site:Web Parts gallery, List Template gallery, Site Template gallery, User Information Profile list