Is there any way to do HTML encoding in C# when characters like apostrophes encoded like ' instead of ' as in case of HttpUtility.HtmlEncode method?
I have the DB that contains a string like this:
str'str
and I need to select it via SQL query when the user type "str'str" in the TextBox. So I want to encode it to the same string first and select it via LIKE operator then.
Thanks in advance.
'instead of'