I have the following code but I am getting the following compile errors:
Attribute 'WebPartStorage' is not valid on this declaration type. It is only valid on 'property, indexer' declarations.
AND
Attribute 'FriendlyName' is not valid on this declaration type. It is only valid on 'property, indexer' declarations.
I have modified my code from the MSDN article: http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx. Does anyone have any idea what I am doing wrong that is causing 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;
}
}