Page array var and button_click

ALexhwguy

New member
Joined
Mar 7, 2006
Messages
1
Programming Experience
Beginner
Hi

I'm tring to change he value a bool array declared "Global" to my page.

Code:
Public bState(8) As Boolean


Code:
 Private Sub btnON0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnON0.Click
        bState(0) = True
        setStates()
    End Sub

    Private Sub btnOFF0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOFF0.Click
        bState(0) = False
        setStates()
    End Sub

    Private Sub btnON1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnON1.Click
        bState(1) = True
        setStates()
    End Sub

    Private Sub btnOFF1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOFF1.Click
        bState(1) = False
        setStates()
    End Sub
The bState is always full of "false" value. How to maintain it values between postback ?
 
Top Bottom