How to implement LIKE operator in this statement, this line display the exactly matched record from the database but I want to display the all matching records which contain the text what I type in textbox.
where var.Attribute("AuthorName").Value.ToLower() == textBox1.Text.ToLower()

Deepak VermaRank #672 · 3.6K reputationPosted Jul 14, 2011, 2:49 AM EDT
where var.Attribute("AuthorName").Value.ToLower().IndexOf(textBox1.Text.ToLower()) != -1
~* cheers *~
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 14, 2011, 2:43 AM EDT
obj.Where(var => var.Attribute("AuthorName").Value.ToLower().Contains(textBox1.Text.ToLower()))
you can also use .StartsWith() or .EndsWidth()