I have a calculator with two textboxes. The user enters a number in each one, then presses a button to add, subtract, multiply, or divide the two numbers, with the results in a label. The user should click a save button, where the textbox.text is saved as an arraylist. Then the user should click the display button to display the text, but this has to happen up to ten times (ten saves). I can save it once, but can't figure out how to add more than one to the arraylist. Here is my code:
Public Sub btnStore_Click(sender As Object, e As EventArgs) Handles
btnStore_Click
Session("myArray") = Input
i = Convert.ToInt32(Session("increment"))
Input.Insert(i, txtResults.Text)
Session("myArray") = Input
Session("increment") = Convert.ToInt32(Session("increment")) + 1
End Sub
Public Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles
btnDisplay.Click
output1.Text = Convert.ToString(Session("myArray"))
End Sub