Monday, August 17, 2009

Adding custom properties to Webparts in Sharepoint 2007

Apparently the syntax changed in MOSS 2007 to add custom properties to your web part in.

Code below:

[WebBrowsable(true)]
[WebDisplayName("Connection string:")]
[SPWebCategoryName("Data")]
[WebPartStorage(Storage.Shared)]
[WebDescription("Connectionstring")]
[Personalizable(PersonalizationScope.Shared)]
public string ConnectionString { get; set; }

No comments:

Post a Comment