protected void btnSearch_Click(object sender, EventArgs e)
{
string strCondition = "";
strCondition += " and " + this.ddlSearchItem1.SelectedValue + " like '%" + this.txtSearchInput1.Text + "%' ";
strCondition += " and " + this.ddlSearchItem2.SelectedValue + " like '%" + this.txtSearchInput2.Text + "%' ";
ViewState["Condition"] = strCondition;
ViewState["CurPage"] = 1;//显示第一页
gv.PageIndex = 0;
gvDatabind();
}
比如输入001何输入001_ 返回的结果是一样的
this.txtSearchInput1.Text.Trim();
多谢多谢
啥意思,要一样的结果?
一般都是将空格Trim掉再查询的。肯定一样了。
额。像这样从文本框接收的字符是怎么写trim语句。