In a .Net web application I use the public DataRow[] Select(string filterExpression) method in many places. Due to a last minute change characters such as ‘ and ” are now valid input. What options do I have, is there a way to change the filterExpression in an adequate way and still preserve the Select functionality on the datatable, can I switch to LINQ?
In a .Net web application I use the public DataRow[] Select(string filterExpression) method in
Share
Escape the single quote (‘) in an expression literal by doubling it: ”
No need to escape the double quote (“) within a string literal. String literals are bound by single quotes, so the double quote need only be standard C# escaped: \” (or “” if within a verbatim string starting with the @ symbol)
See this link for more information.