Client OM – Enable javascript Intellisense

How to enable javascript/ECMAScript Intellisense in VS 2010

1. Add an application page, and add this to the PAGEHEAD:

<% #if SOME_UNDEFINED_CONSTANT %>
<script type=”text/javascript” src=”/_layouts/SP.debug.js” ></script>
<% #endif %>

How to enable javascript/ECMAScript Intellisense in Visual Web Part

1. Add a Visual Web Part, then add these:

<% #if SOME_UNDEFINED_CONSTANT %>

<script type=”text/javascript” src=”/_layouts/MicrosoftAjax.js” ></script>

<script type=”text/javascript” src=”/_layouts/SP.debug.js”></script>

<% #endif %>

How to enable javascript/ECMAScript Intellisense in a standalone Javascript file

1. Add a Jscript in VS 2010, then add these:

<reference path=”C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\MicrosoftAjax.js” />
<reference path=”C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.debug.js” />

 

 

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: