public void DataBind(string key = "") { DataTable dt = new DataTable(); if (NodeID > 0) { dt = bll.GetProductnodidRecycler(NodeID); } else { dt = bll.GetProductAllRecycler(); } if (!string.IsNullOrEmpty(Request.QueryString["keyWord"])) { dt = bll.GetProductnodidRecycler(0); if (DataConverter.CLng(Request.QueryString["keyWord"]) > 0) { dt.DefaultView.RowFilter = "ID=" + DataConverter.CLng(Request.QueryString["keyWord"]); } else { dt.DefaultView.RowFilter = "ProName like '%" + Request.QueryString["keyWord"] + "%'"; } dt = dt.DefaultView.ToTable(); } Egv.DataSource = dt; Egv.DataBind(); }