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...
Upendra Pratap ShahiPosted Jun 17, 2015, 4:41 AM
Sreekanth ReddyPosted Jun 17, 2015, 2:11 AM
so, now you can place the code as{ModelState.AddModelError("","eeroro message");
}