Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need masked textbox in asp.net

  • only numbers must be in that textbox
  • that entries have to be in 100 between 500
  • TextBox Needed to include 3 Decimal Places

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

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

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 ?

like image 492
torun Avatar asked Feb 26 '23 19:02

torun


2 Answers

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

like image 143
Ed B Avatar answered Mar 02 '23 23:03

Ed B


Take a look at the MaskedEditExtender from the AjaxControlToolkit. It might be what you need.

like image 41
Matthew Jones Avatar answered Mar 02 '23 21:03

Matthew Jones