A commonly used C# web control is the DropDownList. A DropDownList acquiesce a web user to baddest from a set of items. Each selectable item has a text field (which the web user sees) plus a hidden value field for programming purposes. adding a DropDownList is simple via drag and drop from the toolbox under the Standard section. To add items to your DropDownList via the Designer view, cross to the Properties of the DropDownList. Under the Misc section, click Items. You will see a button with an ellipses. Clicking that button opens a chat box that lists the accepted items. The options for anniversary items are Enabled, Selected, Text, Value.
Example of a DropDownList with three items where item A is selected by default:
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="1" Selected="True">A</asp:ListItem>
<asp:ListItem Value="2">B</asp:ListItem>
<asp:ListItem Value="3">C</asp:ListItem>
</asp:DropDownList>
0 comments:
Post a Comment