SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create my own custom setting asp page with 3 fields and a save button:

FirstName LastName EmailAddress

If I click on the save button I would like to save these 3 fields to the propertybag of sharepoint.

On the default site settings page I would like to add a hyperlink to my custom setting asp page.

I would like to implement this in VS to deploy only a wsp file to my SharePoint environment.

Where to begin??

share|improve this question
up vote 2 down vote accepted

I would just develop a custom application page (I belive a page in the _layout folder may be enough) and then use a custom action to display the link on the site setting page in the desidered position.

So, assuming you have a page called "EmailSettingPage.aspx" you would do something similar to:

    Title="Email Settings"
    Description="Sets the email related settings for the current site."
    <UrlAction Url="_layouts/EmailSettingPage.aspx" />

This sample would add a new link in the "Site Tasks" section of the Site Settings page. You will have to change the name, title and such to match your requirements.

also you should decide the scope of your solution: should it be farm wide, specific to a single site collection or just a web site? There is no correct answer - it just depends on what you want to do.

This is just a basic idea of how to start. If you need some more specific guidance, feel free to ask for further details.

Edit: Some more accurate notes.

Start out by defining the "scope" of your solution. You need to point out who will use it and where. This info will help you to decide which "scope" your features should have. In your case the most important detail is defining the scope for the custom action... most appropiate seem site-collection level (the new link will be available on all site) or web-site level (only on specified webs). Cannot really help here - it depends on what you need to do, there isn't a silver bullet.

As I told you before, the link in the setting page can be added with a custom action. You asked "where I should put it?"... A custom action is a declarative element that you can add to a feature. Providing full details here would be a little too long.. anyway you have some templates that you can use depending on the SP version (2007 has the SPVisualDev pluging, for 2010 there is the CKSDev one). I suggest that you read some of the MSDN docs before starting - it isn't hard after you get it, the only difficulty is selecting the correct group and location ids. Some links: tutorial on Rafelo blog, msdn page.

Some quick point about the action. The url action represents the uri of the page you intend to use. In the above sample it is "_layouts/...". No one is blocking you from using a different url, but take notice that some url may bring headaches if you will need to used the "pretty pinky unicorns dancing on the rainbow" MUI support. Trad: if you use an url that referes to a "localized" folder (==Pages) you are... in bad waters.

When you have the link it is time to develop the page. You have some option here: module, application page ecc... but I would just go for a page in the _layout folder. That way you can just add a mapped folder in your visual studio solution (assuming you are on sp2010 + vs2010) and develop a standard page. Just a last warning: first, you said that you will save the setting in the property bag. Ok, that can do, just remember to chose a bag appropiate to the scope of the settings. If they should different for each web, do not chose a site-collection bag. And please, always ensure you store serializable objects in the bag... I have heared scarry tales of corrupted farms, and it seems that SharePoint will accept dangerous items without much concern...

share|improve this answer
Thank you sparchaeologist.. Lets begin for example with a single site collection. Tell me more :) I am also wondering where to add the <CustomAction.. code. – Ola Feb 14 '13 at 15:58
@KHA - ok, I will try to expand my answer. But I would ask you to edit the question and try to add some more background about what you need to do and what are your requirement. You want to add some parameter to a property bag... but should you do this on a web by web basis or it is a site collection setting? Why you need this parameters? who will use the page? I will try to add more guidance since I guess you are still learning (sorry if I was too short on explaining) but I would like to know more about the problem to provide some more specific suggestions. – SPArchaeologist Feb 14 '13 at 16:40
Hi..I will use the value of these parameters in a some code which will executed by a custom workflow builded in Visual Studio. The site administrators are allowed to change these parameters. – Ola Feb 18 '13 at 14:50
@KHA - ok understood. I will leave you some more info then. Only one more question. Your settings should be common to the whole site collection right? – SPArchaeologist Feb 18 '13 at 16:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.