Create custom list property in SharePoint list settings

InfoPath alternatives for form designing SharePoint

In this post we will discuss how we can create a custom list property in SharePoint list settings.

Read some SharePoint 2010 tutorials:

Update/Delete SharePoint 2010 List Item using Javascript

List of SharePoint Shortcut Page URLs

SharePoint Server 2016 Installation FREE PDF guide

Here the custom property will come under the General Setting category in list settings page.

Follow below steps:

– Open Visual Studio and then create a new SharePoint empty project and then right click on the project and add new item. THen from the Add New Item dialog box select List Definition template from list of SharePoint 2010 templates. Check fig below:

Create custom list property in SharePoint list settings
Create custom list property in SharePoint list settings

– If you will open the Elements.xml file then it should be like the below fig.

Create custom list property in SharePoint list settings

– Then modify the Elements.xml file like below fig.

Create custom list property in SharePoint 2010 list settings

– After this Right Click on the project and the Deploy. After the Deployment finsh open the list settings page. You will see a link called as “My Custom Settings” under General Settings category as shown in the fig below:

Create custom list property in SharePoint 2010 list settings

– Here we will show a alert box when ever a user clicks on the link. To write the code open the listsettings.aspx.cs file as shown in the fig.

Create custom list property in SharePoint 2010 list settings


– Write the below code:

protected void Button2_Click(object sender, EventArgs e)
{
page.ClientScript.RegisterStartupScript(owner.GetType(),
“ShowMessage”, string.Format(“<script type=’text/javascript’>alert(‘Hello..!’)</script>”);
}


You May Also like the Following SharePoint Online Tutorials:

About Sagar Pardeshi

I am Developer working on Microsoft Technologies for the past 6+years. I am very much passionate about programming and my core skills are SharePoint, ASP.NET & C#,Jquery,Javascript,REST. I am running this blog to share my experience & learning with the community I am an MCP, MCTS .NET & Sharepoint 2010, MCPD Sharepoint 2010, and MCSD HTML 5,Sharepoint 2013 Core Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.

View all posts by Sagar Pardeshi →

Leave a Reply