Link to home
Start Free TrialLog in
Avatar of Robert Treadwell
Robert TreadwellFlag for United States of America

asked on

Prepend and Append Dropdownlist

I'm trying to prepend and append values to DropdownList.  Currently all dropdownlist contain ListItem with Text equal to '- Select -"  and all other database items appended dynamically to control.  Customer now wants to append 'Other' to every list.  I do not want to place in table because I want 'Other' to always be the last item in the list.  How do I do this?

See example control in code section.
<asp:DropDownList ID="Allergies1DDL" runat="server" AppendDataBoundItems="True" 
                                                   DataSourceID="AllergiesDS" DataTextField="Allergy" 
                                                   DataValueField="Allergy" TabIndex="1" Width="12.5em">
                                                   <asp:ListItem Text="-Select-" Value="0"></asp:ListItem></asp:DropDownList>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Carlos Villegas
Carlos Villegas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial