2
Reply

If Condition for Both Integer and float

Hareesh Bollepalli

Hareesh Bollepalli

Jun 17 2015 1:59 AM
366
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)