用于检索关键字的搜索字段 [英] Search field for retrieving keywords
问题描述
我已经成功创建了一个搜索文本框来检索数据(根据homepagedoctor教程 http://expression.microsoft .com / zh-cn / dd571513.aspx )我想知道是否可以修改这个以搜索数据字段中的任何字符串,如果是,如何?即"喜欢%text%"
(因此输入"汽车"会使汽车车辆疤痕恐慌等。)
希望这是有道理的。
感谢任何有信息的人。
Lidia
I have successfully created a search textbox to retrieve data (as per the homepagedoctor tutorial http://expression.microsoft.com/en-us/dd571513.aspx )
I am wondering if this can be modified to search for any string within the data field, and if so, how? ie "like %text% "
(so that typing in "car" would return car cart cars scar scare etc. )
Hope this makes sense.
Thanks to anyone who has information.
Lidia
推荐答案
当您添加WHERE子句时,不要选择"=",而选择"LIKE" ;。
EW为LIKE的搜索词的正面和背面添加%,因此您的用户不需要自己这样做。
When you are adding the WHERE clause, instead of selecting "=", select "LIKE".
EW adds % to the front and back of the search term for the LIKE, so your users don't need to do that themselves.
这篇关于用于检索关键字的搜索字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!