|
I wrote the following code in the 1.aspx screen button click event in ASP.NET:
Dim scriptStr As String = "<script>" + vbCrLf
scriptStr += "document.all.tbxitemJap.value = document.all.tbxitemJap.value +'" + DB + "';"
scriptStr += "</script>"
Among them, DB is a variable, which is obtained from the database.
But there may be such data in my database Lao People's
For this kind of data with ', this script will report an error, what should be done?
Is it necessary to convert this variable into ASCII code, and then turn it back? |
|