Irwsoft Web Control

ListControl

ListControl is base class for DropDownList, DropDownTable, and ListBox controls. These controls have items inside list which give user to select the data. The data can be defined inline inside ASPX markup and using data-source. The data-source object is set to DataSource or using data-source provider control which the ID is set to DataSourceID property.

Example : inline items with DropDownList control


ASPX codes inline items with DropDownList

// 1) Defines the DropDownList control in DataPerson.aspx page
<irw:DropDownList ID="DDL1" runat="server" SkinStyle="SimpleGrey">
     <DataPropertyNames>  // 2) Defines a propertyto bind inside DataPropertyNames tag with DataType is List and Type is SamplesNET2.Data.GenderType.
          <irw:DataPropertyName Name="Gender" DataType="List" Type="SamplesNET2.Data.GenderType" />
     </DataPropertyNames>
     <Items>  // 3) Defines the values of SamplesNET2.Data.GenderType
          <irw:ListItem Text="Male" Value="Male" />
          <irw:ListItem Text="Female" Value="Female" />
     </Items>
</irw:DropDownList>

Related Topics :

Irwsoft Data Ultimate Edition 4.0 supports data-schema extension (entity framework, linq to sql, simple class, and etc).