我需要在asp.net中屏蔽蒙版的文本框 [英] I need masked textbox in asp.net

查看:88
本文介绍了我需要在asp.net中屏蔽蒙版的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 该文本框中只能有数字
  • 参赛作品必须在500到100之间
  • 文本框需要包含3个小数位

在将值插入数据库时​​,我不会出现任何错误.

I don't want any mistakes while values inserting to database.

我需要使用jQuery或ASP.NET验证控件吗?

Do I need to use jQuery or ASP.NET Validation Controls?

如果jQuery是有用的,那么我将使用哪个插件?或者,如果它是asp.net RegEx验证程序,我将使用哪个验证表达式? 还是有免费的ASP.NET扩展文本框?

If jQuery is the useful one, then which plugin will I use? Or if it is asp.net RegEx Validator, which Validation Expression will I use? Or is there any free ASP.NET Extended TextBox ?

推荐答案

此jquery插件效果很好,并且可自定义. http://digitalbush.com/projects/masked-input-plugin/#demo

This jquery plugin works great, and it's very customizable. http://digitalbush.com/projects/masked-input-plugin/#demo

请记住,即使您使用的控件/插件非常好并且将用户限制在您想要的位置,您仍然应该在服务器端进行验证,因为用户可以使用跨站点脚本来绕过控件

Remember, even if the control/plugin you use is very good and limits the user to what you want, you should still verify on the server side because users can bypass your controls with cross-site scripting

这篇关于我需要在asp.net中屏蔽蒙版的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆