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

DefaultDoubleValue on TextBox in C#.net

DefaultDoubleValue on TextBox in C#.net
public static Double DefaultDoubleValue(TextBox txt)
{
try
{
if (String.IsNullOrEmpty(txt.Text))
{
return 0.00;
}
else
{
return Convert.ToDouble(txt.Text);
}
}
catch (Exception ex)
{
Program.WriteLog(ex.Message, ex.StackTrace);
return 0.00;
}
}