Labels

CSOM (1) JavaScript (1) SharePoint (1)

Thursday, February 7, 2013


JavaScript Intellisense for SharePoint 2010 Client Object Model in Script .js file

/// <reference path ="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js" />
/// <reference name="MicrosoftAjax.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" />




JavaScript Intellisense for SharePoint 2010 Client Object Model in Application Page .aspx file


<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <SharePoint:ScriptLink ID="ScriptLinkB" runat="server" Name="sp.js">
    </SharePoint:ScriptLink>
    <script type="text/javascript" src="/dev/_layouts/SP.debug.js" />
    <script type="text/javascript">
        var ctx = SP.ClientContext.get_current();
        ctx.get_serverVersion();
        
    </script>
</asp:Content>



JavaScript Intellisense for SharePoint 2010 Client Object Model in Visual WebPart .aspx file


<% #if XXXX %>
<script type="text/javascript" src="/dev/_layouts/MicrosoftAjax.js" />
<script type="text/javascript" src="/dev/_layouts/SP.debug.js" />
<% #endif %>
    <script type="text/ecmascript" language="ecmascript">
 
        var x = SP.ClientContext.get_current();
        
    </script>


JavaScript Intellisense for SharePoint 2010 Client Object Model in Visual WebPart (SandBox) .aspx file

<% #if XXXX %>
<script type="text/javascript" src="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\MicrosoftAjax.js" />
<script type="text/javascript" src="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.debug.js" />
<% #endif %>
 
 <script type="text/ecmascript" language="ecmascript">
 
     var x = SP.ClientContext.get_current();
        
 </script>