protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { KeyWordBind(); DataSet ds = InviteService.GetList(""); if (ds.Tables[0].Rows.Count > 0) { repInfo.DataSource = ds; repInfo.DataBind(); } } }
/// <summary> /// 加载数据 /// </summary> private void LoadData() { DataSet ds = InviteService.GetList(""); if (ds.Tables[0].Rows.Count > 0) { this.repInfo.DataSource = ds; repInfo.DataBind(); } else { this.repInfo.DataSource = null; repInfo.DataBind(); } }