I have shirts and hats and both items have quantity boxes. I need the subtotal before tax and the total after tax. Whenever I run it I get an error in the Total = Registar () line. Could someone please correct my code for me. It's driving me crazy. The sales tax is 8 percent and if 1 shirt and 2 hats were selected when I press the submit button it needs to return the subtotal and total. Thank you!
<html>
<head>
<title>Sales Tax</title>
</head>
<body>
<center>
<form name="_ctl0" method="post" action="maybe.aspx" id="_ctl0">
<br><span id="Message1">Shirts ($5 each)</span>
<input name="Text1" column="1" type="text" id="Text1" />
<br>
<br><span id="Message2">Hats ($10 each)</span>
<input name="Text2" column="1" type="text" id="Text2" />
<br><br>
<INPUT type=submit>
<br>
<br>Subtotal: $<span id="Message3">0</span>
<br>
<br>Total after tax: $<span id="Message4">0</span>
</center>
</form>
<script language="
vb" runat="server">
Sub Page_Load()
Dim Text1 As Integer
Dim Text2 As Integer
Dim Stax As Decimal
Dim x As Integer
Dim y As Integer
Dim Total As Decimal
Text1 = x * 215.99
Text2 = y * 30.99
Stax = .08
Total = Registar()
Display1.Text = Total
End Sub
Function Registar(Total as Integer)
Total = (Text1 + Text2)(Stax)
End Function
</script>
</body>
</html>