Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using EPiServer.Core;
using System.Drawing;
using System.ComponentModel;
using EPiServer.PlugIn;
namespace omnion
{
[PageDefinitionTypePlugIn]
public class MyDropdownProperty : PropertyNumber
{
public override void CreateChildControls(string renderType, System.Web.UI.Control container)
{
switch(renderType)
{
case "edit":
DropDownList list = new DropDownList();
list.ID = this.Name;
CopyWebAttributes(container, list);
list.Items.Add( new ListItem("On", "0") );
list.Items.Add( new ListItem("Off", "1") );
container.Controls.Add(list);
container.Controls.Add(CreateParseValidator(list));
break;
default:
base.CreateChildControls(renderType, container);
break;
}
}
}
}
Buy your collegues an icecream with the money and continue work with EPiServer :D
/Øyvind
ElektroPost Norway
list.SelectedValue=this.Value.ToString();