0

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
atahelsel
  • 21
  • 5
  • look at this example.. [How do i add to a simple array in vb.net](http://stackoverflow.com/questions/11421716/how-do-i-add-to-a-simple-array-in-vb-net) – AdorableVB Mar 30 '17 at 03:54
  • my issue is regarding how to save the array contents between page post backs and then display them in a separate button click, not just how to add to an arraylist. – atahelsel Mar 30 '17 at 14:10

0 Answers0