i have a textbox which accepts hours. The max length is 4. Only numeric and decimal values can be entered in the textbox so when the user enters values like
on click of ok button an alert should be displayed.
previously i was using this condition
if(plannedHours == "0")
// display an alert message.
But now since the user is allowed to enter decimal values also, the above combinations of zero's with or without decimal points is not displaying an alert message when user clicks on ok button.
so how can i give a condition so that it satisfies all the possible combinations of zero's with and without decimal also?
please provide me a solution in C#.