How to insert items in to Dropdownlist

First drag and drop your dropdownlist controal .

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>

Comments

Popular posts from this blog

Search Record From Table Using jQuery in Asp.net core MVC

Calendar in Asp.net

CheckBox in Asp.Net MVC (Insert Data of CheckBox in Database and GetData Of checkBox From DataBase)