Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<asp:TextBox id=myText runat=server width=50 onTextChanged=calcTotal AutoPostBack=True />
...
in script or codebehind...
Sub calcTotal(sender As Object, e As EventArgs) Handles calcPrice.Click
Dim cost, ship, tax, taxp As Double
cost = (CType(singlePO.items(0).FindControl("poCostTxt"), TextBox)).Text
If CType(singlePO.items(0).FindControl("poShipTxt"), TextBox).Text = "" Then
CType(singlePO.items(0).FindControl("poShipTxt"), TextBox).Text = FormatCurrency(0)
End If
ship = (CType(singlePO.items(0).FindControl("poShipTxt"), TextBox)).Text
taxp = (CType(singlePO.items(0).FindControl("poTaxPTxt"), TextBox)).Text
Dim taxTb As TextBox = (CType(singlePO.items(0).FindControl("poTaxTxt"), TextBox))
Dim total As TextBox = (CType(singlePO.items(0).FindControl("poTotalTxt"), TextBox))
Dim shipTb As TextBox = (CType(singlePO.items(0).FindControl("poShipTxt"), TextBox))
Dim costTb As TextBox = (CType(singlePO.items(0).FindControl("poCostTxt"), TextBox))
If (CType(singlePO.items(0).FindControl("poTaxCb"), CheckBox)).Checked Then
tax = cost * taxp
taxTb.Text = FormatCurrency(tax)
total.text = FormatCurrency(cost + ship + tax)
costTb.Text = FormatCurrency(costTb.Text)
shipTb.Text = FormatCurrency(shipTb.Text)
Else
taxtb.text = FormatCurrency(0)
total.Text = FormatCurrency(cost + ship)
costTb.Text = FormatCurrency(costTb.Text)
shipTb.Text = FormatCurrency(shipTb.Text)
End If
End Sub