private void BindLicense() { DropDownListLicense.ClearSelection(); DropDownListLicense.DataSource = SPARInsightManagement.Web.Code.License.GetLicenseAvailableList(); DropDownListLicense.DataTextField = "LicenseKey"; DropDownListLicense.DataValueField = "LicenseId"; DropDownListLicense.DataBind(); if (DropDownListLicense.Items.Count > 1) { DropDownListLicense.Items.Insert(0, new ListItem("Please select", "0")); } }
private void ClearLicenseAvailable() { DropDownListLicense.ClearSelection(); DropDownListLicense.Items.FindByValue("0").Selected = true; }