Home > SharePoint 2010 > wow.. Client Object Model IntelliSense SharePoint in Visual Studio 2010

wow.. Client Object Model IntelliSense SharePoint in Visual Studio 2010

I got it.
Put this code inside your visual web part

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

<script type=”text/javascript” language=”javascript”>
ExecuteOrDelayUntilScriptLoaded(test, “sp.js”);

function test() {
this.ClientContext = SPClientContext.get_current();
}
</script>

if you have no MicrosoftAjax.js in your Layout folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\)
download it from here
http://www.4shared.com/document/OO-v3qsg/MicrosoftAjax.html

done; try..

Image

happy coding 🙂

Advertisements
Categories: SharePoint 2010
  1. No comments yet.
  1. No trackbacks yet.

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: