开发者

How to search every word separated by comma in textbox

I have text box ...If i type in textbox like

"C,C++,ASP.net,4-5Years" then every word should be checked by database whether that name exi开发者_StackOverflowts or not in table field of the database. It should be check separately of every word, just like Search engines.

How can i do in asp.net?


This is fairly quick-and-dirty but will get you started.

string[] split = YourTextBox.Text.Split(new char[] {','});
foreach(string str in split)
{
    //check the database about str
    //perhaps using a LIKE query for partial matches
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜