在Asp.net中使用文本框进行搜索 [英] Search with a text box in Asp.net

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

问题描述

你好,



我有一个数据库表产品。我需要从Asp.net页面搜索产品名称,如果产品名称存在于DB中,那么我必须将结果显示为网格。如果他们输入了错误的产品名称,那么,我必须显示一条消息。



我可以用JQUERY进行搜索吗?任何人都可以帮我解决这个如何处理JQuery的问题吗?



谢谢。

Hello,

I have a Data base table Products. I need to search Product Name from Asp.net page and if product name exists in DB, then I have to displey the result to grid. If they enter Wrong product name, then, I have to display a message.

Can I do this serach with JQUERY? Can any one please help me on this how to do with JQuery?

Thank you.

推荐答案

是的你可以。您可以通过Ajax发送请求;并且您的ASP.NET服务器部分应该处理请求并生成包含搜索结果的页面。这样,主要工作在服务器端完成。要使用jQuery执行Ajax,请参阅: http://api.jquery.com/category/ajax/ [< a href =http://api.jquery.com/category/ajax/target =_ blanktitle =New Window> ^ ]。



-SA
Yes, you can. You can send a request via Ajax; and your ASP.NET server part is supposed to process a request and generate a page with search results. This way, main job is done on the server side. To do Ajax with jQuery, please see: http://api.jquery.com/category/ajax/[^].

—SA


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

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