Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation error 1

Status
Not open for further replies.

mrathi

Technical User
Oct 27, 2003
115
US
Hi, Thanks for all the responses in advance.

I have created a textbox in an aspx page. I have put a range validator on the textbox, ex it can accept only 0 to 100. Then I put in 101 in the textbox and click a button, it gives me the error. So I change the value to 99 or any other valid value. It still gives me the same error when i click the button. Does the previous value gets stored somewhere and the error continues?

Please help.

Thanks
 
Does the previous value gets stored somewhere and the error continues?
Answer: No. It sounds like there's something else at play here.

Could you verify that you don't possibly have 2 validators (one overlapping the other).

Regards,
Mike

"Don’t get suckered in by the comments – they can be terribly misleading. Debug
only code. – Dave Storer."
 
It sounds like there's something else at play here.

You're probably right Mike555 although I would hazard a guess that it's the Type property that is the problem rather than another control.

mrathi,

Make sure that the Type property of the validator control is set to Integer (I would guess that you currently have it set as the default of "String").

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Hi thanks for the replies.

Mike when you say overlapping validators, what do you mean? I have two validators for the textbox, one making sure that it is not empty and one checking the range of the input value.

ca8msm, I think you were right. I had to change the Type property to integer rather than string, and it took care of my problem.

Thanks you guys.
 
Sometimes when I'm working with several validators on one page I simply copy/paste validators and then change the ControlToValidate propery. Sometimes I copy/paste one to many times and end up with 2 validators at the same location. That's all I was checking for...

Regards,
Mike

"Don’t get suckered in by the comments – they can be terribly misleading. Debug
only code. – Dave Storer."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top