Try this to check if TextBox1 or TextBox2 are empty . If there are not save them.
if ((String.IsNullOrEmpty(TextBox1.Text)) || (TextBox1.Text == "0")||(String.IsNullOrEmpty(TextBox2.Text)) || (TextBox2.Text == "0")|| etc...)
{
string Msg = "<script>alert('The textbox cannot be empty or zero!');</script>";
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alert", Msg, false);
}
else
{
}
{