How do I make a webpart's settings configurable in Sharepoint?

I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am publishing a portal template.

I want to develop a WebPart and make some settings configurable (just like we can configure parameters for a console application in app.config)

For example, authorized users could set parameters of WebPart in Edit Page (from browser based UI interface), then Select -> Modify WebPart properties, or edit parameters in SharePoint Designer.

The parameters would be application specific parameters.

How do I go about doing this?

Answers


You can make your properties on the webpart and add attributes like so....

[WebBrowsable(true),Category("Calendar Setup"),
 WebDisplayName("Starting Date Column"),
 WebDescription("column that contains item starting date"),
 Personalizable(PersonalizationScope.Shared)]
public DateTime StartDate { get; set; }

You should check here for a full list and a good article on the subject.


Need Your Help

Generating Pdf from webpage in asp.net

c# asp.net pdf invoice

Could you give me some recommendations on free/Openspurce library etc that could be integrated on asp.net application to Generate Pdf out of Html fragments. I will be generating Invoices that is

Best method of scaling text to fill an HTML5 canvas

text html5 canvas svg scale

I need to 'scale' text to fill an antire HTML5 canvas. It appears that the scale() method does not affect text. I've seen approximation methods with iterative loops on the measureText() method but ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.