My Asp.net page contains a RequiredFieldValidator and RegularExpressionValidator. Texbox1 collects a bid amount for an item and is typically in us dollars. This is the code I used ValidationExpression="^\d+(\.\d\d)?$" ControlToValidate="TextBox1".
It works great. My application is setup to email me when an error occurs on the site. Below is an extract of a recent error.
The error description is as follows : System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.InvalidCastException: Cast from string "35.000 US$" to type 'Double' is not valid. ---> System.FormatException: Input string was not in a correct format.
Why can't I replicate this error. When testing from IE 7. The form will not allow me to enter "35.000 US$" . Does RequiredFieldValidator and RegularExpressionValidator only work on certain web clients? Do I need to add addtional validation bin the code behind?
Thank you in advance for your help.