Hi paul,
Please refer below code
HTML
<div>
Amount:-
<asp:TextBox ID="TextBox1" runat="server" />
<br />
Percentage:-
<asp:TextBox ID="TextBox2" runat="server" AutoPostBack="true" />
<br />
<asp:Button ID="btnCalculate" Text="Calculate" OnClick="btnCalculate_Click" runat="server" />
<br />
Result:-
<asp:Label ID="lblTotalAmount" runat="server" />
</div>
C#
protected void btnCalculate_Click(object sender, EventArgs e)
{
int value = Convert.ToInt32(TextBox1.Text);
double percent = Convert.ToDouble(TextBox2.Text);
lblTotalAmount.Text = ((value * percent) / 100 + value).ToString();
}
Screenshot
Hope this works for you