Developer Guide
aspx:FieldDropDown

    This component is a HTML select element, used to view picklist data types.

    <aspx:FieldDropDown runat='server' value='{!Model.Status}'/>
     
    If you bind a Picklist Field to this control, the Picklist values are automatically added and shown as options on this control. It is also possible to add your own option values through "Databind" properties or specify values declaratively, as shown below:
    <aspx:FieldDropDown runat='server' value='{!Model.Status}'>
         <items>
            <asp:ListItem text='Item1' value='Value1' />
            <asp:ListItem text='Item2' value='Value2' />
        </items>
    </aspx:FieldDropDown>

     

    If you would like to bind a custom list as a Model into the control, do the following:

    <aspx:FieldDropDown runat='server' DataSource='<%#Model.Contacts%>' DataTextField='Name' DataValueField='Id' value='{!Model.ContactId}'/>
    
    

     

    If you would like to bind a custom list from the DataBag, do the following:

    <aspx:FieldDropDown runat='server' DataSource='<%#DataBag.Contacts%>' DataTextField="Name" DataValueField="Id" value='{!Model.ContactId}'/>
    
    

     

    PropertyDescription
    IdThe ID of the HTML element.
    ValueBind value containing name of the object and the field to bind.
    LabelLabel of the field within the section.
    RequiredA Boolean value that specifies whether this inputField is a required field. If set to true, the user must specify a value for this field. If not selected, this value defaults to false.
    HintA Text value that is shown to the user on the right side of the input component to assist the user.
    HideLabelA Boolean value that specifies whether this Field's label should be visible or not. If set to false, the input component spans cross the entire row.
    EnabledA boolean that determines whether to show the field or not.
    PlaceHolderText shown inside the input component as watermark.
    WidthThe width of the input component, the value can be provided in pixels or percentage.
    DataSourceA List or an Array that will populate the contents of the dropdown.
    DataTextFieldA Text field used in conjuction with DataSouce. Thisdefines which field should be used to display in the select dropdown.
    DataValueFieldA Text field used in conjuction with DataSource. This defines what field should be used to populate the value field of the select statement.
    IsNullableA boolean that defines whether or not the field can be null.
    HelpTextA text value that displays a small bubble next to the field label. When hovered over, the help text will appear.
    ReadOnlyA boolean value that determines whether this field can be set or not.