I have the following code, but I get the following compilation errors:
WebPartStorage attribute is not valid for this ad type. It is valid only for 'property, indexer' declarations.
and
FriendlyName is not valid for this ad type. It is valid only for 'property, indexer' declarations.
I changed my code from an MSDN article: http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx . Does anyone know what I'm doing wrong what causes this error?
[Category("Custom Properties")]
[DefaultValue(RegionEnum.None)]
[WebPartStorage(Storage.Shared)]
[FriendlyName("Region")]
[Description("Select a value from the dropdown list.")]
[Browsable(true)]
protected RegionEnum _Region;
public RegionEnum Region
{
get
{
return _Region;
}
set
{
_Region = value;
}
}
source
share