Board index » dotnet-framework-aspnet » Bug in Compare Validator??
|
Andrew
|
Bug in Compare Validator??
2004-10-16 12:15:25 AM
I just ran into this on a page I am building. I needed to ensure the user typed in a value less than 60. I added a Compare Validator, bound it to the input text box, set Operator="LessThan", and ValueToCompare="60". Now, if I type in 1 through 6, or any double digit value less than 60 no problem. However... if I type in the numbers 7, 8, or 9, I get an error. If I type in 07, 08, or 09, I get no error. Uh, say what? Why does 7 bomb when 07 does not? What is going on here? Here are steps to recreate the problem I am getting: 1) Create a new blank WebForm 2) Add a Text Box Web Control 3) Add a Compare Validator Webcontrol and a) Set ErrorMessage="Value greater than 60" b) Set Operator="LessThan" c) Bind it to the text box above 4) Add a Button Web Control 5) Add a Validation Summary Web Control 6) Run the page in the browser and try the numbers I mentioned above. I am using VB.Net as my language .Net Framework 1.1 (v1.1.4322 SP1) MS Server 2k3 Enterprise Ed. MS Visual Studio 2K3 (v7.1.3088) -- Andrew - |
