Here's my code :
string zoekstring = Request.QueryString["txt"].Replace("'", "''");
List<IntranetDocument> result = documenten.FindAll(x => x.Titel.Contains(zoekstring));
if(result.Any())
{
foreach (IntranetDocument doc in result)
{
ListItem li = new ListItem();
li.Text = doc.Titel;
li.Value = doc.Locatie;
ListFiles.Items.Add(li);
}
}
else
{
ListItem li = new ListItem();
li.Text = Res.Get("Algemeen_NotFound");
li.Value = "#";
ListFiles.Items.Add(li);
}
This will do a FindAll on all my documents (that I've previously loaded in via an SQL query) and checks on the document Titel. So if I search for "report" it will give me back all documents where Titel contains "report" for example for quarterly finance reports.
Now I'd also want documents returned where Titel contains "Report" with an uppercase R. Or even "rePort" or "ReporT" or "REPORT"... you get the idea. i want the FindAll ... Titel.Contains(zoekstring) to not only return the document where titel contains LITERALLY "zoekstring" but also a potential uppercase/lowercase...
How can I achieve this?