public void BindCafe() { dsLogin = new DataSet(); dsLogin = obj_Login.GetCafe(out StrError); if (dsLogin.Tables.Count > 0 && dsLogin.Tables[0].Rows.Count > 0) { DDLLoc.DataSource = dsLogin.Tables[0]; DDLLoc.DataTextField = "Cafeteria"; DDLLoc.DataValueField = "CafeteriaId"; DDLLoc.DataBind(); DDLLoc.SelectedIndex = 0; } else { } }