开发者

How to make search bar in asp.net which fetch record from database according to user input in asp.net?

开发者 https://www.devze.com 2023-03-05 14:57 出处:网络
开发者_运维百科I want to make search field where user enter his required data, and if data is available is DB then it fetch that data and display it. if not then give error message. using asp.net. Any
开发者_运维百科

I want to make search field where user enter his required data, and if data is available is DB then it fetch that data and display it. if not then give error message. using asp.net. Any Idea? or visual studio 2010 have any component like that? I am new to asp.net.


ASP.net Data access tutorials would be a good place to start


The question is so general to answer, but you can make a query using the required criteria you want to filter or search according to it. if you want to search about specific record in your table you can use COUNT() function in SQL to get the number of records, if it returns 0 then no data returned and you can show info message, if it returned > 0 then fetch the data back.

0

精彩评论

暂无评论...
验证码 换一张
取 消