Hi,
Using the following code, you can load the data in dropdownlist and make the desired value selected in the dropdown list while loading.
clientDropDownList.DataSource = client;
clientDropDownList.DataTextField = "ClientName";
clientDropDownList.DataValueField = "ClientID";
clientDropDownList.Items.Insert(0, new ListItem("select", "0"));
clientDropDownList.DataBind();
clientDropDownList.Items.FindByText(clientList.ClientName).Selected = true;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment