Saturday, May 29, 2010

Client Object Model – Javascript Applications

Accessing Client Object Model

For ECMAScript applications (Located in TEMPLATE\LAYOUTS under SharePoint root)

  • DLLs required for SharePoint client applications are located under SharePoint Root folder (14 hive)
    • SP.js
    • SP.Core.js
    • SP.Ribbon.js
    • SP.Runtime.js
  • Add ScriptControl tag, which is part of Microsoft.SharePoint.Controls as follows
    • <SharePoint:ScriptLink ID=”myscriptlink” runat=”server” Name=”sp.debug.js” />
  • Add reference to System.Web.WebControls namespace.
  • Add FormDigest tag, if the client application needs to update to the SharePoint database. This is for security reasons.
    • <SharePoint:FormDigest runat=”server” />
Technorati Tags: ,,,

No comments:

Post a Comment