Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook

You're reading from  Microsoft SharePoint 2010 Development with Visual Studio 2010 Expert Cookbook

Product type Book
Published in Sep 2011
Publisher Packt
ISBN-13 9781849684583
Pages 296 pages
Edition 1st Edition
Languages
Author (1):
Balaji Kithiganahalli Balaji Kithiganahalli
Profile icon Balaji Kithiganahalli

Table of Contents (15) Chapters

Microsoft SharePoint 2010 Development with Visual Studio 2010: Expert Cookbook
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Lists and Event Receivers 2. Workflows 3. Advanced Workflows 4. List Definitions and Content Types 5. Web Parts 6. Web Services and REST 7. Working with Client Object Model Index

Using JavaScript Object Model


So far we have only used the Managed Object Model. IIn this recipe we will use JavaScript OM and list first five items of our contacts list.

Getting ready

You should complete the previous recipe successfully to follow this one.

How to do it...

In order to use the JavaScript Object Model, adhere to the following steps:

  1. If you have closed your Visual Studio IDE, launch it now as an administrator and create a new project of type Empty SharePoint Project. Name the project JavaScriptOM.

  2. By default, Visual Studio selects the SharePoint site available on the machine. Select Deploy as Farm Solution and click on Next to proceed to the next step in the wizard.

  3. Now add a new item and choose Application Page. Name this page JavaScriptOM.aspx.

  4. Visual Studio automatically creates a Layouts folder and a subfolder underneath it called JavaScriptOM. Inside this folder you should see your ASPX page.

  5. In this page, add the code and get the items from the contacts list. Your application...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}