计算机毕业设计介绍:
protected void Button1_Click(object sender, EventArgs e)
{
string _w = SearchText.Text;
if (_w != "")
{
Info s = new Info();
Dal dal = new Dal();
s.Name = _w;
DataSet Ds = dal.GetName(s);
//Response.Write(Ds.Tables[0].Rows[0]["I_UserName"]);
UserList.DataSource = Ds;
UserList.DataBind();
if(Ds.Tables[0].Rows.Count==0)
{
Label1.Visible = true;
Label1.Text = "找不到相关信息!";
}
}
else
{
Jscript.Alert("不能为空!");
}
}
<责任编辑:计算机毕业设计网(http://www.xiaoniu168.com)>