nedash says:
if (!IsPostBack)
{ int rahn2 = int.Parse(Txtrahn2.Text);
int rahn1 = int.Parse(Txtrahn1.Text);
}
Change above with the below code.
if (!IsPostBack)
{
int rahn2 = int.Parse(string.IsNullOrEmpty(Txtrahn2.Text) ? "0" : Txtrahn2.Text);
int rahn1 = int.Parse(string.IsNullOrEmpty(Txtrahn1.Text) ? "0" : Txtrahn1.Text);
}
OR
if (!IsPostBack)
{
decimal rahn2 = decimal.Parse(string.IsNullOrEmpty(Txtrahn2.Text) ? "0" : Txtrahn2.Text);
decimal rahn1 = decimal.Parse(string.IsNullOrEmpty(Txtrahn1.Text) ? "0" : Txtrahn1.Text);
}