如何禁止在文本框中使用双引号 "
最佳答案
因为你永远无法控制用户在客户端做什么,你不妨在服务器上检查一下,所以你可能会使用类似这样的代码:
if (textBox1.Text.Contains("\""))
{
Response.Write("Dey aint no way I'm letting you type that!");
}
关于c# - asp.net 中的验证表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4769002/