mardi 16 juin 2015

If Condition for Both Integer and float

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...

Aucun commentaire:

Enregistrer un commentaire