Check for IsNumeric
Whenever a programmer/developer is working with forms/profiles, validation is necessary. Here, i would like to share you codesnippet for 'isNumeric' validation.
Just add this function in your application core library(public class), so that you can access anywhere in your application thru reference.
public static bool IsNumeric(string value)
{
if (String.IsNullOrEmpty(value) == false)
{
for (int i = 0; i < value.Length; i++)
{
if (Char.IsNumber(value, i) == false)
{
return false;
}
}
return true;
}
else
{
return false;
}
}