protected void Page_Load(object sender, EventArgs e) { if (KnowledgeID != "") {//FAQ数据绑定 DataTable dt = new DataTable(); QueryKLFAQ query = new QueryKLFAQ(); long nKnowledgeID = -1; if (long.TryParse(KnowledgeID, out nKnowledgeID)) { ; } { query.KLID = nKnowledgeID; int totalCount = 0; dt = BLL.KLFAQ.Instance.GetKLFAQ(query, "", 1, 100, out totalCount); dt.Columns.Add("Num"); int num = 1; foreach (DataRow dr in dt.Rows) { dr["Num"] = num.ToString(); num++; } Rt_FAQList.DataSource = dt; Rt_FAQList.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (KnowledgeID != string.Empty) {//FAQ数据绑定 DataTable dt = new DataTable(); QueryKLFAQ query = new QueryKLFAQ(); query.KLID = long.Parse(KnowledgeID); int totalCount = 0; dt = BLL.KLFAQ.Instance.GetKLFAQ(query, "", 1, 100, out totalCount); Rt_FAQList.DataSource = dt; Rt_FAQList.DataBind(); } }