请问如何把搜索结果输出到DataList控件上???
string sql = "SELECT reportid,UserName,DateTime,MechineSituation,MechineState,IP,ReportContent FROM Report Where " + Request.QueryString["cid"].ToString() + " = " + Request.QueryString["key"].ToString();SqlCommand cmd = new SqlCommand(sql, conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
DataList1.DataSource = ds;
DataList1.DataBind();
我用这样的放了搜索结果,但是怎么Datalist输出结果请给点提示 谢谢!~