Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP - how to remove single quote from user input text

answer  = Request.Form("Text" & i) 

In a form a user inputs random text which is inserted into a database. Currently if the user puts in single quotes it creates an error. How do i remove just single quotes' from the users answer?

like image 921
Beginner Avatar asked Dec 10 '25 10:12

Beginner


1 Answers

Use

answer.Replace("\'", "");

The above will replace the Single quote.

like image 57
Bindas Avatar answered Dec 12 '25 09:12

Bindas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!