public void MyBind() { B_KeyWord bkeyword = new B_KeyWord(); GridView1.DataSource = bkeyword.GetKeyWordAll();// GetAuthorPage(0, 0, 10); GridView1.DataBind(); }
//关键字绑定 protected void BindKeyword() { B_KeyWord bkeyword = new B_KeyWord(); DataTable dt = bkeyword.GetKeyWordAll(); RepKeyword.DataSource = dt; RepKeyword.DataBind(); }
//关键字绑定 protected void BindKeyword() { B_KeyWord bkeyword = new B_KeyWord(); DataTable dt = bkeyword.GetKeyWordAll(); RepKeyword.DataSource = dt; RepKeyword.DataBind(); if (dt != null) { dt.Dispose(); } }
public string getKey() { B_KeyWord bll = new B_KeyWord(); DataTable temptable = bll.GetKeyWordAll(); string keys = ""; for (int i = 0; i < temptable.Rows.Count; i++) { if (i == 0) { keys = temptable.Rows[i]["KeywordText"].ToString(); } else { keys = keys + "," + temptable.Rows[i]["KeywordText"].ToString(); } } return(keys); }