使用文本框的搜索方法

时间:2016-08-16 01:34:30

标签: c# sql asp.net

我使用文本框和按钮创建简单搜索页面 当我尝试搜索时,结果仅在我在文本框中键入数字时显示

这是我的Sql

类方法

protected void ButSrch_Click(object sender, EventArgs e)
{
    GridView5.DataSource = classobject.searchname(Textsrch.Text);
    GridView5.DataBind();
}
代码后面的

Maria 56 - Barak - Rano30

这不是问题方法正确工作

但问题是:

我在表格中有以下用户:

{{1}}

但是当我尝试输入文本框 Maria - >结果是什么

当我尝试输入 Maria 56 - >结果是什么

但是当我输入文本框 56 时,结果显示在gridview

中 谁能帮助我?

0 个答案:

没有答案