2
Answers

Escaping single quotes and double quotes in a String

Ask a question
aidin

aidin

20y
2k
1
I have a textbox in wich users can put there input. I want this String to be escaped of strange characters, single quotes and double quotes. Since I don't want my SQL query to crash, with bad user input. Is there a standard function for this in .NET ? In PHP with mysql you have the mysql_escape_string() method is there a similar method in .Net ? Keyboard

Answers (2)