Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 gridview 有一个带有国家名称的单一条目主。我必须在 asp.net c# 的网格视图中编辑数据。我想验证编辑模板内的文本框以查看用户是否输入了无效字符。我想使用简单的 javascript 代码来验证这一点。
我在正则表达式验证器中尝试了 [a-zA_Z] ...它导致我的应用程序变慢。所以我更喜欢JS。
我尝试使用 C# 中的行数据绑定事件获取客户端 ID 的值,但它中断了程序的工作流程。:(
您是否有不想使用 ASP.NET 验证器来测试它的原因?它将对数据应用服务器端和客户端检查。
参考网址:http: //msdn.microsoft.com/en-us/library/aa479013.aspx