We can define array of list items to the dropdownlist in code behind
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
ListItem[] li = new ListItem[4];
{
new ListItem("AP","1");
new ListItem("UP","2");
new ListItem("MP","3");
new ListItem("TS","4");
}
DropDownList1.Items.AddRange(li);
//INSERT AN ITEM AS LISTITEM AT ZERO INDEX
DropDownList1.Items.Insert(0, new ListItem("Select State", "0"));
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
ListItem[] li = new ListItem[4];
{
new ListItem("AP","1");
new ListItem("UP","2");
new ListItem("MP","3");
new ListItem("TS","4");
}
DropDownList1.Items.AddRange(li);
//INSERT AN ITEM AS LISTITEM AT ZERO INDEX
DropDownList1.Items.Insert(0, new ListItem("Select State", "0"));