0

Couldn't find any related resources
I want to add a custom property to my visual webPart, the normal way of adding properties not working with type of Dictionary

[Personalizable(), WebBrowsable(), WebDisplayName("News Sources"), WebDescription("description")]
public Dictionary<Guid,string> NewsSources { get; set; }

any alternatives?

Rami Alshareef
  • 7,015
  • 12
  • 47
  • 75

1 Answers1

0

The property of type Dictionary cannot be added to Custom WebPart.

If you want to have the dropdown list as the property, the backing store must be of type enum

See:

Creating a Web Part with Custom Properties
http://msdn.microsoft.com/en-us/library/dd584174(v=office.11).aspx

Madhur Ahuja
  • 22,211
  • 14
  • 71
  • 124