How can you use the RowFilter to search on a string with an ampersand in (or any other ‘special’ character. e.g. !”£$%^&*())
When I try I receive the following error:
Error in Like operator: the string pattern ‘%£(*$\&%’ is invalid
A copy of my RowFilter is below:
value="£(*$\&"; //I know this is rubbish, but I don't want the system to crash.
filterString = string.Format("Description LIKE '%{0}%'", value);
myDataView.RowFilter=filterString;
Thanks in advance.
I’m using C# 4.0
May be this one can help..
Also check http://www.csharp-examples.net/dataview-rowfilter/