Hari B

Hari B

  • NA
  • 139
  • 67.7k

If Condition for Both Integer and float

Jun 17 2015 1:59 AM
Hello All,
Here I have one problem my text box allowed only integer and float value. if eny thing else will give error message.Please find my code Below.
if (!int.TryParse(x, out value))
{
ModelState.AddModelError("","eeroro message");
}
Please help me
Thanks in advance...

Answers (2)