Asp.Net 2.0网站中的搜索功能 [英] search functionality in Asp.Net 2.0 website

查看:69
本文介绍了Asp.Net 2.0网站中的搜索功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须在我的网站上实现搜索功能.
我正在使用ASP.net 2.0.
有人可以建议我可以通过哪些方法实现这一目标?

任何帮助将不胜感激....

问候,
Gopal

hi all,

I have to implement search fuctionality on my website.
I am using ASP.net 2.0.
Can anybody suggest what are the methods in which I can achieve this?

Any help would be much appreciated....

Regards,
Gopal

推荐答案

确定!

1.创建一个ASP.NET网站
2.创建一个新的搜索页面(ASPX)
3.现在,在此搜索页面中,放置一个文本框,按钮&数据网格
4.在按钮单击事件中,获取在文本框中输入的文本.使用文本形成搜索查询,您将运行数据库以获取结果
5.从数据库检索到数据后,请使用该数据集/数据表并将其绑定到datagrid进行显示.

试试吧!

要使用代码与数据库连接,请尝试使用ADO.NET.看看此处 [
Sure!

1. Create a ASP.NET website
2. Create a new search page(ASPX)
3. Now, in this search page, place a textbox, button & a datagrid
4. In button click event, fetch the text entered in the textbox. Use the text to form a search query that you will run ion the database to get back result
5. Once data retrieved from DB, use that dataset/datatable and bind it to datagrid for display.

Try!

For connection with DB using code, try ADO.NET. have a look here[^] for it.


这篇关于Asp.Net 2.0网站中的搜索功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆