London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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();