protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } List <TblMauThongBao> lstThongBao = MauThongBaoBussiness.GetListMauThongBao(); nv.DataSource = lstThongBao; nv.DataBind(); }
private void LoadDDLMauThongBao() { List <TblMauThongBao> lstMauThongBao = MauThongBaoBussiness.GetListMauThongBao(); foreach (var item in lstMauThongBao) { ListItem listItem = new ListItem(); listItem.Text = item.TenMauThongBao; listItem.Value = item.Id.ToString(); ddlMoTa.Items.Add(listItem); } }