I'm trying to validate my input in my textbox so that any values <=0 will pop up an error message box but this is the error message I'm receiving :
Operator '<' cannot be applied to operands of type 'string' and 'double'.
How do I fix this?
I'm trying to validate my input in my textbox so that any values <=0 will pop up an error message box but this is the error message I'm receiving :
Operator '<' cannot be applied to operands of type 'string' and 'double'.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Munesh SharmaRank #174 · 13.9K reputationPosted Sep 30, 2014, 2:34 AM EDT
Abhishek KumarRank #510 · 4.8K reputationPosted Sep 30, 2014, 3:12 AM EDT
Please try with compare validator.
ControlToValidate="TextBox1" ErrorMessage=" number Must be > 0"
Operator="GreaterThan" Type="Integer"
ValueToCompare="0" />
Or You can try wth jquery code.
VulpesRank #55 · 29.2K reputationPosted Sep 30, 2014, 5:42 AM EDT