How to bind values (Array) to PropertyDropDownList in Dynamic Content in EPiServer CMS 6 R2 ?


Hi Forum,

I am a newbie in EPiServer world, and I have a question which I assume that it is VERY trivial.

I am creating a Dynamic Content in EPiServer CMS 6, pretty much as the example on: (, and exactly as the screenshot which shows on the page.

However, My problem is that when I created a Drop Down List propert, I couldn't fill it with values - How to do?

In Practice, I mean:

public class ClassDynamicContentPlugin : IDynamicContent
protected PropertyString strValue;
protected PropertyDropDownList options;

public ClassDynamicContentPlugin()
strValue = new PropertyString { Name = "Fill Value here" };
options = new PropertyDropDownList { Name = "Select Value"};

Now, The output seems OK, It shows:

A TextBox field for the strValue => Works perfectly as expected.
A DropDownList control for the options => Works as expected, But it is EMPTY DropDownList! - How can I make the DropDownList shows some values?

Ideally, I want the DropDownList shows some values, Where in the code can I pass those values?

Simply, In plain ASP.NET I wanna accomplish something like this:

string[] myStrings = new string[] {"string1", "string2", "string3"};
DropDownList ddl = new DropDownList();
ddl.DataSource = myStrings;

So Forum, How to simply bind some values e.g. (Array of strings) to PropertyDropDownList in Dynamic Content in EPiServer CMS 6 ?

Thanks !

Jan 22, 2014 18:41

Unless episerver has updated dynamic content (and i don't think they have), this is the best way I found a couple of years ago:

Jan 23, 2014 8:04
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.