<script runat="server"> Public strResults(9) As String Public dblNum1 As Double Public dblNum2 As Double Public dblResult As Double Protected Sub SomeSub1() Handles btnSomeButton.Click ' Actions etc. ' Assign values from two TextBox controls to dblNum1 and dblNum2 ' Perform calculation (e.g., add, subtract) and assign result to dblResult ' Display result of calculation in another TextBox control End Sub Protected Sub SomeSub2() Handles btnSave.Click ' Actions etc. ' Save calculation to strResults Array (after SomeSub1 is run the values all return zero) End Sub </script>
I've attempted to explain as brief as possible. Basically, when SomeSub1 runs performing a calculation and displaying the results and then SomeSub2 runs the variables are all containing zero values. How to retain variable values?