日期:2014-05-17 浏览次数:20392 次
protected void bind()
{
string key = txtsreach.Text.Trim();
string connectionString = ConfigurationManager.ConnectionStrings["lijunConnectionString"].ConnectionString;
SqlConnection cnn = new SqlConnection(connectionString);
string st = "select * from Article,Class where artitle like '%" + @key + "%' or artmkr like '%" + @key + "%' or artcnt like '%" + @key + "%' or content like '%" + @key + "%' ";
SqlDataAdapter da = new SqlDataAdapter(st, cnn);
DataSet ds = new DataSet();
da.Fill(ds);
dl.DataBind();
ds.Clear();
cnn.Close();
}
protected void bind()
{
string key = txtsreach.Text.Trim();
string connectionString = ConfigurationManager.ConnectionStrings["lijunConnectionString"].ConnectionString;
SqlConnection cnn = new SqlConnection(connectionString);
string st = "select * from Article,Class where artitle like '%" + @key + "%' or artmkr like '%" + @key + "%' or artcnt like '%" + @key + "%' or content like '%" + @key + "%' ";
SqlDataAdapter da = new SqlDataAdapter(st, cnn);
DataSet ds = new DataSet();
da.Fill(ds);
dl.datasource= ds ;
dl.DataBind();
ds.Clear();
cnn.Close();
}