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 VermaPosted Jul 14, 2011, 6:49 AM
where var.Attribute("AuthorName").Value.ToLower().IndexOf(textBox1.Text.ToLower()) != -1
~* cheers *~
Jaganathan BantheswaranPosted Jul 14, 2011, 6:43 AM
obj.Where(var => var.Attribute("AuthorName").Value.ToLower().Contains(textBox1.Text.ToLower()))
you can also use .StartsWith() or .EndsWidth()