Create custom Action group using visual studio 2010 in SharePoint 2010

InfoPath alternatives for form designing SharePoint

In this post we will discuss steps to create custom Action group using visual studio 2010 in SharePoint 2010. Also you can check out:

– How to create event receivers using Visual Studio 2010 in SharePoint 2010?

– Custom Ordering by Folder in Document Library for SharePoint 2010

– Localize apps for SharePoint Store in Auto hosted apps for SharePoint online 2013

Follow below steps:

1. First we create an Empty SharePoint Project, and give the name CustomActiongroup.

2. Now add an Empty Element and give the name is CustomGroup. See in fig

Create custom Action group using visual studio 2010 in SharePoint 2010
Create custom Action group using visual studio 2010 in SharePoint 2010

3. Now open the elements.xml file and replace the following code –

<?xml version=”1.0″ encoding=”utf-8″?>
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>

<!– Add a Custom Group “Master Page Look And Feel” under Site Actions –>
<CustomActionGroup Description=”Custom Group”
Id=”CustomgroupAction”
Location=”Microsoft.SharePoint.SiteSettings”
Sequence=”100″
Title=”Custom Action Group”>
</CustomActionGroup>

<!– Add a Link under the Group “Master Page Look And Feel” in Site Actions –>
<CustomAction GroupId=”CustomgroupAction”
Id=”UserInterfaceCustomActions.SiteSettings”
Location=”Microsoft.SharePoint.SiteSettings”
Sequence=”20″
Title=”Change Background Image”>
<UrlAction Url=”javascript:OpenPopUpPageWithTitle(‘/_layouts/CustomActiongroup/changeMasterPageLayouts.aspx’,RefreshOnDialogClose,600,400,’Change Background Image’)” />

</CustomAction>

</Elements>

4. Now right click on project solution and select Add => SharePoint “Layouts” Mapped Folder. See in fig

Create custom Action group using visual studio 2012
Create custom Action group using visual studio 2012

5. Now right click on CustomActiongroup under Layouts folder and add Application Page and give the name changeMasterPageLayouts.aspx. See in fig

Create custom Action group using visual studio 2010 in SharePoint 2013
Create custom Action group using visual studio 2010 in SharePoint 2013

6. Now write the code in application page for the action taken by custom action. This page will open in a model dialog.

7. Now deploy your project.

8. Open your site collection and go to Site Settings, you able to see your custom action. See in fig

Create custom Action group using visual studio 2012 in SharePoint 2016
Create custom Action group using visual studio 2012 in SharePoint 2016

Similar SharePoint 2013 Tutorials


About Navneet Singh

I am Navneet Singh, Working at C3it software solutions pvt. ltd. in Pune. My core skills are SharePoint 2013, Office 365, SharePoint 2010, SharePoint Designer, SharePoint Designer Workflow, Nintex Workflow, Infopath, Webpart, CSOM/SSOM, Power-shell, C#, ASP.NET and SQL Server.

View all posts by Navneet Singh →

Leave a Reply