Actually you might be right:
I have been working on the code and have made some progress. I will post the full error message and the new code
[quote]
Compiler Error Message: BC30545: Property access must assign to the property or use its value.
Source Error:
Line 39: <asp:Button id="Add2" OnClick="Add" runat="server" Text="Deposit Money"/><br>
Line 40: <asp:Button id="Subtract2" OnClick="Subtract" runat="server" Text="Withdraw Money"/><br>
Line 41: New Balance : <% Session ("CurrentBalance") %> = newbal
Line 42:
Line 43: <input type="Submit">
Source File: \\argofiler.argo.uwf.edu\students\web\jrb47\aspnet \assignment6\test4.aspx Line: 41
[/code]
and the new code
Code:
<script language="vb" runat="server">
Sub page_Load()
if Page.IsPostBack then
Dim intnewbal As Double
Dim lblAnswer as decimal
End if
End sub
Sub Add(sender as object, e As EventArgs)
DIM newbal as decimal
DIM lblAnswer as decimal
newbal = newbal + CDbl(tbxInput1.text)
Session ("newbal") = 0
End Sub
Sub Subtract(sender as object, e As EventArgs)
DIM newbal as decimal
newbal = newbal - CDbl(tbxInput1.text)
DIM lblAnswer as decimal
Session ("newbal") = 0
End Sub
</script>
<html>
<head>
<title>Your ATM Machine</title>
</head>
<body>
<h1>Welcome to the ATM</h1><br/><br/>
<form id="BalanceForm" method ="post" action="bank.aspx runat="server">
Current Balance: $
<span id="bal">0</span>
<asp:textbox id="tbxInput1" runat="server" /><br/>
<asp:Button id="Add2" OnClick="Add" runat="server" Text="Deposit Money"/><br>
<asp:Button id="Subtract2" OnClick="Subtract" runat="server" Text="Withdraw Money"/><br>
<input type="Submit">
</form>
New Balance : <% Session ("CurrentBalance") %>
</body>
</html>
Any help appreciated.