Tuesday, February 7, 2012

Multiple items while binding the data to the dropdown


ddlAsset.Items.RemoveAt(0);
ListItem li = new ListItem();
li.Text = "--Select--";
li.Value = "0";
ddlAsset.Items.Insert(0, li);

selected the value from database by using :

ddlAsset.Items.FindByValue("value").Selected = true;

No comments:

Post a Comment

Comments

Protected by Copyscape Plagiarism Software