[CustomControlPath("path to the custom control")][CustomAttribute("Type", bool)]public bool IsGreen{ get;set;}
[CustomControlPath("path to the custom control")]
[CustomAttribute("Type", bool)]
public bool IsGreen
{
get;set;
}
An example can be a bool :
public partial class BooleanUserControl : System.Web.DynamicData.FieldTemplateUserControl { /// <summary> /// uiCheckBox control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.CheckBox UiCheckBox;
public override Control DataControl { get { return UiCheckBox; } }
protected override void OnDataBinding(EventArgs e) { base.OnDataBinding(e);
object val = FieldValue;
if ( val != null) UiCheckBox.Checked = (bool) val; }