Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
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:
http://talk.alfnilsson.se/2011/06/27/using-propertydropdownlist-with-episerver-dynamic-properties/
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: (http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-6-R2/Dynamic-Content/), 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;
ddl.DataBind();
So Forum, How to simply bind some values e.g. (Array of strings) to PropertyDropDownList in Dynamic Content in EPiServer CMS 6 ?
Thanks !