I need a hidden text box in asp.net

  • in this text box should be only numbers
  • that records should be in 100 between 500
  • TextBox Must include 3 decimal places

I do not want any errors when inserting values ​​into the database.

Do I need to use jQuery or ASP.NET controls?

If jQuery is useful, which plugin will I use? Or, if it is an ASP.NET RegEx validation, which one do I use a validation expression? Or is there a free, free ASP.NET Extended TextBox?

+4
source share
3 answers

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

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

+6
source

Take a look at MaskedEditExtender from AjaxControlToolkit. This may be what you need.

+1
source

Take a look at the Ajax Toolkit and use the Masked Edit Extender, it is very easy to use :-) http://www.asp.net/ajaxlibrary/act_MaskedEdit.ashx

+1
source

Source: https://habr.com/ru/post/1313553/


All Articles