注册 登录
编程论坛 ASP.NET技术论坛

[求助]搜索引擎

bavfhpdn66 发布于 2007-05-06 02:26, 722 次点击
请问哪位高手有比较优化的搜索引擎模块代码?C#语言编写的
谢谢!
6 回复
#2
beniao2007-05-06 02:28
自己整一个出来
#3
bavfhpdn662007-05-06 21:42

好的
谢谢

只有本站会员才能查看附件,请 登录

你有没有这种查询模块控件源代码?
急用~~
#4
skyland842007-05-07 13:32
自己可以做一个吧?
#5
airfei2007-05-07 14:03
这个简单呀.
给你个思路,建张表,废话.呵呵
如果想理解简单的话,就写下线路车的编号,出发地,目的地,然后自己绘制上述界面,把两个textbox中的内容保存下来,然后根据这两项查询数据库,再在另一网页中显示出全部信息,
就是select * from table where start ='"+start+"'and end = '"+end+"'
#6
刘小芳2007-05-07 19:49
我怕他是想用这代码去网上找结果哦,楼上的那个太简单了,直接查数据库里的,寒````
#7
bavfhpdn662007-05-07 20:18

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class search : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
private void fillDg()
{
this.GridView1.DataSource = wayoperater.creatercon();
this.GridView1.DataBind();
}
protected void btnsearch_Click(object sender, EventArgs e)
{
string condition ="";
condition = "1=1";
if (this.ckbstart.Checked)
{
condition = "Start=" + this.txtstart.Text;

}
else
{
condition = "Start like '%'";
}
if (this.ckbwhither.Checked)
{
condition += " and Whither like '%" + this.txtwhither.Text + "%'";
}
DataView dv = new DataView(wayoperater.selectAlltb_Way());
dv.RowFilter =condition;
dv.Sort = "id Desc";
this.GridView1.DataSource = dv;
this.GridView1.DataBind();

}
}

为什么模糊查询可以
当我输入“kk”精确查询就提示“用户代码未处理 EvaluateException”错误!
未找到列[kk]

这是为什么
哪位高手指点一下
谢谢!

1