Create SharePoint Ribbon Custom Action in VS2012

Source: Internet
Author: User

Original address: Creating SharePoint Ribbon customactions with Visual Studio 2012 This document is translated by Spfarmer

sharepoint ribbon Custom Actions xml commanduidefinition Id   cksdev   ribbon Custom Action SharePoint ProjectItem . This new spi provides an easy-to-use thought to guide you in creating a custom Action

First you need to create a new sharepoint App Project sharepoint projects inside. In my example today, I will be in list item ribbon add custom action default.aspx page. Of course you can use traditional techniques such as adding javascript, pass the parameter Span style= "COLOR: #333333", tool How to use.

in the Add New Item menu, you can see the wizard. Select the Ribbon Custom Action and enter a name.


When you click Add, you go to the next step. Here you need to choose which you want to apply to the Sue hostWebor isApp Web. Remember,App WebHave yoursappall the inside of the same, the hostWebI 'm boarding you.appof theWeb.  One use of this feature is that the user clicks on the hostWebentry, you can clickRibbonof theAction, and was then brought toapp.

You can now bind Custom Action to a list template or List Instance . If you choose to host the Web, It will provide you with a List of instance to choose from. Otherwise, if you choose List template, It will provide you with a list of your favorite lists of template to choose from.


in this case, I have chosen App Web , and then a List instance.


continue to the next step, it will let you define Ribbon , as well as the text to be displayed, and the target page of the redirect after the click. You can select Any existing ASP . NET page in the current project . If you want to run JavaScript, you need to edit the XML after the wizard finishes .


It will list all the places where this control can be placed:


when you're done, Visual Studio build what you need. XML , you can modify it as needed. Then, at this point, you can't go back to the wizard. If you still want the wizard, you have to delete the itemandrecreate it.


now we can run Project , and then open our settings Action of the List , select an entry in the Ribbon I saw this on the other. Action .


Click Ribbon Action, I was redirected to my App Home page. .


I am very excited about this function because I used to do Custom Action It 's always hard to do now Custom Action It's a lot easier. This is important because this is one of the key ways to link the host Web and the app Web .

Published Dec, 11:18 AM by Coreyroth

Filed under: SharePoint, Visual StudioOne, SharePoint, Apps

Create SharePoint Ribbon Custom Action in VS2012

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.