h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Set DefaultIntValue in C#.net

Set DefaultIntValue in C#.net
public static int DefaultIntValue(TextBox txt)
{
try
{
if (String.IsNullOrEmpty(txt.Text))
{
return 0;
}
else
{
return Convert.ToInt32(txt.Text);
}
}
catch (Exception ex)
{
Program.WriteLog(ex.Message, ex.StackTrace);
return 0;
}
}