public void clinic_names() { Code cd = new Code(); DataSet ds = cd.Assign_Cliniclist_Dropdown(); if (ds != null && ds.Tables[0].Rows.Count > 0) { DropDownList2.DataTextField = "Name"; DropDownList2.DataValueField = "ID"; DropDownList2.DataSource = ds; DropDownList2.DataBind(); DropDownList2.Items.Insert(0, " "); } }