Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


Recycle Bin | MMS | ManagedVsCrawledProperties |

Sunday, May 5, 2013

Add Button to sharepoint Ribbon control using visual studio 2012

In this task, you will add a custom action to the ribbon of all Document Libraries to launch the App.
  1. In Visual Studio, right click the HelloApp node and select AddØNew Item from the Context menu.
  2. In the New Item dialog, select Ribbon Custom Action.
  3. Name the item Launcher and click Add.
  4. In the Create Custom Action for Ribbon window, choose to expose the custom action to the Host Web.  The Custom Action should be scoped to List Template, and the particular item the custom action is scoped to is Document Library.  
  5. In the next window, we will specify settings to generate a button control for the ribbon.  Use the following settings:
    1. Where is the control located? Ribbon.Documents.Manage.Controls._children
    2. What is the label text for the button control? Go! 
    3. Where does the button control navigate to? HelloApp\Pages\Default.aspx


Launch an App from the Ribbon:

In this task, you will deploy the App and use the button on the Ribbon to launch it.
  1. In Visual Studio, right click the HelloApp node and select Deploy from the Context menu.
  2. After the App is deployed, open the home page of the portal where the App is hosted (not the App itself!).
  3. On the home page, click Site Contents.
  4. Click Add an App.
  5. Select to Add a Document Library.
  6. Name the Document Library Shared Documents.
  7. On the Apps page, click the newly-created Shared Documents library.  
  8. In the ribbon, click the Files tab.
  9. Launch the App using the button you created. 

Launching the App from the Ribbon

No comments:

Post a Comment