Exemple #1
0
        private void DataBind()
        {
            string strWhere = "1=1";

            if (DropDownList1.SelectedIndex > 0)
            {
                strWhere += "and WName='" + DropDownList1.SelectedValue + "'";
            }
            if (TextBox1.Text.Trim() != "")
            {
                strWhere += "and WName like '%" + TextBox1.Text.Trim() + "%'";
            }
            Gvexam.DataSource = bll.GetUserInfoList(strWhere);
            Gvexam.DataBind();
        }