When the button is clicked the desired calculations are not been calculated.
After the Tax paid variable eis entered in the text box, no further calculation taking place.
In the result textbox getting the same data as eneterd in the Tax paid Text box.Can anyone tell wat is the error..
The highlighted statement is not been working.
protected void Button1_Click(object sender, EventArgs e)
{
double excesstaxpaid = 0;
int option;
option = RadioButtonList1.SelectedIndex;
double annualincome;
double taxpaid;
double taxpayable;
double actualincome;
annualincome = Convert.ToInt32(TextBox1.Text);
taxpaid = Convert.ToInt32(TextBox2.Text);
switch (option)
{
case 1:
{
if (annualincome > 34800)
{
actualincome = annualincome - 6035;
taxpayable = 20 / 100 * actualincome;
[COLOR="Red"]excesstaxpaid = taxpaid - taxpayable;[/COLOR] }
else
{
actualincome = annualincome - 6035;
taxpayable = 40 / 100 * actualincome;
[COLOR="red"]excesstaxpaid = taxpaid - taxpayable;[/COLOR] }
}
break;
case 2:
{
if (annualincome > 37400)
{
actualincome = annualincome - 6475;
taxpayable = 20 / 100 * actualincome;
[COLOR="red"]excesstaxpaid = taxpaid - taxpayable;[/COLOR] }
else
{
actualincome = annualincome - 6475;
taxpayable = 40 / 100 * actualincome;
[COLOR="red"]excesstaxpaid = taxpaid - taxpayable;[/COLOR] }
}
break;
case 3:
{
if (annualincome > 37400)
{
actualincome = annualincome - 6475;
taxpayable = 20 / 100 * actualincome;
[COLOR="red"] excesstaxpaid = taxpaid - taxpayable;[/COLOR] }
else
{
actualincome = annualincome - 6475;
taxpayable = 40 / 100 * actualincome;
[COLOR="red"]excesstaxpaid = taxpaid - taxpayable;[/COLOR]
}
}
break;
Label1.Text = excesstaxpaid.ToString();