In this post we will discuss how we can create a custom list property in SharePoint list settings. Also you can check out some posts on:
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:
- If you will open the Elements.xml file then it should be like the below fig.
- Then modify the Elements.xml file like below fig.
- 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:
- 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.
- Write the below code:
protected void Button2_Click(object sender, EventArgs e)