troubleshooting Question

RegularExpressionValidator - Issue

Avatar of cannase
cannase asked on
13 Comments1 Solution287 ViewsLast Modified:
My 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.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros