How to insert items in to Dropdownlist
First drag and drop your dropdownlist controal .
click on Edit item...
click on Edit item...
- click on Add
- selected by default false
- set text
- and gives values
- click on ok and item is insert into dropdownlist.
- With source
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
Add items in to dropdown Box<br />
<br />
<br />
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="1">Rajkot</asp:ListItem>
</asp:DropDownList>
</div>
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
Add items in to dropdown Box<br />
<br />
<br />
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="1">Rajkot</asp:ListItem>
</asp:DropDownList>
</div>
</form>
</body>
</html>
Comments
Post a Comment