hi,
I am trying to validate a textbox that has a value of 1 and up so i am saying :
if (mytextbox.Text > 0)
{
}
but it is not working any suggestions please bare in mind that the text has 0 as default value so i cannot say length
hi,
I am trying to validate a textbox that has a value of 1 and up so i am saying :
if (mytextbox.Text > 0)
{
}
but it is not working any suggestions please bare in mind that the text has 0 as default value so i cannot say length
One might assume that the Text property refers to a string, which doesn't make sense to compare with an integer. You probably need to convert your string into an int, then compare it to 0.
sorry i made mistake suppose to be in c# section. admins you can delete this sorry :)
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.