Elczar Adame's Shared Points on SharePoint

Posts tagged ‘Visual Web Part’

Visual Web Part and jQuery in Office 365/SharePoint Online


Below are the steps I have followed to quickly incorporate a jQuery widget in a Visual Web Part deployed in Office 365/SharePoint Online. I have used the Accordion widget of jQuery UI for this demonstration.

The output of this demonstration.

1. Let us start by creating a SharePoint sandboxed solution in our Visual Studio. It contains a Visual Web Part and a Module that holds the .js file for our visual web part.

2. The .ascx file of our visual web part basically contains references to the jQuery .js and .css files. The Protoype.js file is a javascript for our visual web part. Moreover, the .ascx contains the div necessary for the accordion widget we are using in this demonstration.

3. The Prototype.js file contains the function for the accordion in this demonstration.

4. Finally, let us build our solution, deploy it in the solution gallery of our SharePoint Online, and then let us activate it to enjoy the incorporation of jQuery and visual web part in our SharePoint Online.

Hope this would help.

Visual Web Part (Sandboxed) for SharePoint Online in Office 365


Few days back, I was tasked to demonstrate the Visual Web Part (Sandboxed) template of Visual Studio 2010 SharePoint Power Tools for SharePoint Online in Office 365, and below are the steps I have followed:

1. Initially, I have created a sandboxed solution.

Capture 1

2. Then, I have added an item using the Visual Web Part (Sandboxed) template provided by Visual Studio 2010 SharePoint Power Tools. I have simply added a single line to be displayed by the web part.

Capture 2

3. After building and packaging the sandboxed solution, I have uploaded and activated the WSP file in the solution gallery of a SharePoint Online site.

Capture 3

4. And finally, I have added the web part on a page.

Capture 4

5. And there we go, a visual web part (sandboxed) on a SharePoint Online site.

Capture 5

Thanks!

Digg This

Tag Cloud