how to calculate percentage Text-Changed Event In Asp.Net

 Public void txtAboveBelowPercentage_TextChanged(object sender, EventArgs e)
        {
            if (Convert.ToDecimal(txtAbovePercentage.Text) > 0)
            {
                decimal EstimatedAmount = Convert.ToDecimal(txtEstimatedAmount.Text == string.Empty ? "0" : txtEstimatedAmount.Text);
                decimal abovebelow = Convert.ToDecimal(txtAbovePercentage.Text == string.Empty ? "0" : txtAbovePercentage.Text);
                decimal abovebelowvalue = EstimatedAmount * (abovebelow / 100);
                decimal TenderAmount = EstimatedAmount + abovebelowvalue;
                txtTenderAmount.Text = TenderAmount.ToString();
            }
        }

Comments

Popular posts from this blog

String Program in C#

CSV using XmlNode

Controller_Model. cs