---
title: "DropDownList in ASP.Net"  
description: "A DropDownList is also commonly known as combo box. It can contain multiple data members, but in DropDownList we can choose only one value at a time."  
author: "Pushpendra Singh"  
published: 2010-10-12  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/162/dropdownlist-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# DropDownList in ASP.Net

A [DropDownList](https://www.mindstick.com/blog/33/dropdownlist-in-asp-dot-net) is also commonly [known as](https://answers.mindstick.com/qa/38482/name-the-world-s-lightest-material-which-was-manufactured-by-isro-scientists-at-the-vikram-sarabhai-space-centre-thiruvananthapuram-and-is-also-known-as-blue-air) combo box. It can contain [multiple data](https://www.mindstick.com/forum/160246/how-to-apply-multiple-data-annotations-to-a-single-property-to-perform-various-validations) members, but in DropDownList we can [choose](https://yourviews.mindstick.com/view/87863/why-you-should-not-choose-wordpress-for-making-a-website) only one value at a time. DropDownList can save a lot of GUI [space](https://yourviews.mindstick.com/view/87102/when-peoples-will-really-start-living-on-the-moon-explore-the-space) as it is rendered on a Single line and is expanded only when the [user clicks](https://answers.mindstick.com/qa/34556/if-a-user-clicks-all-the-google-ads-on-my-site-is-it-foul) on the Control.\

```
<asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList>
```

![DropDownList Control in ASP.Net](https://www.mindstick.com/mindstickarticle/c59ff82f-4d2c-4874-a868-9088381efa69/images/92e36b2b-5ba6-40af-a394-eadec2f0d5bb.png)

## Declaring a DropDownList in ASP .Net:

A simple declaration for DropDownList can be done as below.

```
<asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList>
```

If we want to add some items statically it can be added inside the Page as follows.

```
<asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem>Select</asp:ListItem> <asp:ListItem>1</asp:ListItem>       <asp:ListItem>2</asp:ListItem>       <asp:ListItem>3</asp:ListItem></asp:DropDownList>
```

## DropDownList Event :\
SelectedIndexChanged event:

This event is fired when user selects any data from Drop down list.

![DropDownList Control in ASP.Net](https://www.mindstick.com/mindstickarticle/c59ff82f-4d2c-4874-a868-9088381efa69/images/c7701c47-4074-4b5d-b579-376798fd9c65.png)

```
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"          OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">         <asp:ListItem>Select</asp:ListItem>         <asp:ListItem>1</asp:ListItem>         <asp:ListItem>2</asp:ListItem>         <asp:ListItem>3</asp:ListItem></asp:DropDownList>protected void DropDownList1_SelectedIndexChanged(object sender,  EventArgs e)    {        Label1.Text = DropDownList1.SelectedValue;    }
```

When you [select](https://www.mindstick.com/forum/34066/use-select-operator-in-linq) value in dropdownlist then [selected value](https://www.mindstick.com/forum/525/get-selected-value-of-datagridviewcomboboxcolumn) will show in the Label.

![DropDownList Control in ASP.Net](https://www.mindstick.com/mindstickarticle/c59ff82f-4d2c-4874-a868-9088381efa69/images/121c01a1-7f01-4d6e-91b6-4105130f9d76.png)

**We can change DropDownList property like forecolor,font,size etc.**

```
<asp:DropDownList ID="DropDownList1" runat="server" Font-Bold="True"             Font-Italic="True" Font-Names="Arial" ForeColor="Fuchsia">            <asp:ListItem>Select</asp:ListItem>            <asp:ListItem>1</asp:ListItem>            <asp:ListItem>2</asp:ListItem>            <asp:ListItem>3</asp:ListItem> </asp:DropDownList>
```

![DropDownList Control in ASP.Net](https://www.mindstick.com/mindstickarticle/c59ff82f-4d2c-4874-a868-9088381efa69/images/e4b7b980-415a-49d3-9ba4-edb39c0c9a70.png)

---

Original Source: https://www.mindstick.com/articles/162/dropdownlist-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
