使用文本框进行AJAX搜索 [英] AJAX Search using Textbox

查看:81
本文介绍了使用文本框进行AJAX搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生,我是印度的桑迪亚.我完成了MCA,最后在.Net Platform上担任初级程序员.

我对.Net平台有很多疑问.请逐一帮助我,我需要清除它,并且我想完美地学习它.


我的页面上有一个文本框和一个gridview.我需要搜索Google之类的数据.

假设我按下键盘上的一个字母S,它必须显示S的所有记录.

而且我还需要文本框内的水印扩展器作为搜索.


请帮我解决这个问题,并给我完整的代码.

谢谢.

解决方案

只有Google可以自动扩展或自动完成jquery,您会发现许多有用的链接

ASP.NET建议程序-自动完成控制 [ ^ ]


查看这些链接
Ajax AutoComplete扩展器
ASP.Net中的自动完成文本框
http://web2.codeproject.com/Articles/36809/TextBox-Watermark-Using-JavaScript-and-CSS [ ^ ]

嗨桑迪亚,
提供完整的代码非常困难,而且非常耗时.
但是在这里,我为您提供了搜索引擎的逻辑.

对于搜索提供程序,您只需要连接SQL Server并从以下命令获取数据:

 选择 *  FROM 人员
位置城市喜欢 '  TextBox.Text' 



有关TextBox中自动提示的信息,请参见以下文章:


ASP.NET建议程序-自动完成控制 [ ^ ]

并且只要关注水印,请参见以下链接:

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/TextBoxWatermark/TextBoxWatermark.aspx [ ^ ]


Dear Sir, This is Sandhya from india. I did my MCA and finally working as a Junior Programmer on .Net Platform.

I have Many Doubts in .Net Platform. Please help me one by one I need to clear it and i want to learn it perfectly.


I have a textbox and a gridview on my page. I need to search the data like Google.

Suppose if i press one letter S from keyboard it must show all the records of S.

and also i need Water mark extender inside Textbox as Search.


Please Please help me this problem and give me complete code.

Thankuuuuuuuuuuuuuuuuuuuuu.

解决方案

Just Google for auto-extender or jquery auto-complete you will find many useful links

ASP.NET Suggester - Auto-complete Control[^]


See These links
Ajax AutoComplete extender
Auto Complete TextBox in ASP.Net
http://web2.codeproject.com/Articles/36809/TextBox-Watermark-Using-JavaScript-and-CSS[^]


Hi Sandhya,
Its very hard and very much time consuming to give the COMPLETE CODE.
But Here I am giving you the Logic For your Search Provider.

For the search provider, You just need to connect with SQL Server and get the data from following command:

SELECT * FROM Persons
WHERE City LIKE 'TextBox.Text'



for AutoSuggestion in TextBox, see the following article:


ASP.NET Suggester - Auto-complete Control[^]

and as far as watermark is Concern, see the link below:

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/TextBoxWatermark/TextBoxWatermark.aspx[^]


这篇关于使用文本框进行AJAX搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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