Regular Expression for numeric field in Asp.net 2.0 & 3.5

Any new developer needed to understand importance of the validation in their application to avoid future errors or bug in application. For this purpose developer must ensure the user input to their application is proper and well handled to avoid future bug or error in the application.
In the list of validation the important validation is numeric validation. in numeric validation user must enter or application must prompt the user to enter only numeric field. In asp.net we/developer normally use the Regular Expression Validation but proper regulion expression is as follows
  • ^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$
    Use this to restrict the user to enter Only numeric field
    give me ur feedback if any
    Enjoy

Comments

Popular posts from this blog

Implement Logging in CSV file using Nlog in .net core MVC application- part 2

Implement Nlog in .Net core MVC application part 1

Angular User Session Timeout example step by step

Restore the lost focus of Auto post back controls in asp.net update Panel control

Disable backspace key using Jquery