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.

VB.NET:
Public bState(8) As Boolean



VB.NET:
 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 ?
 
Welcome to you, and please post in best suited forum, this is an ASP.Net request, moved to Caching forum.

Here is an MS article I found "INFO: ASP.NET State Management Overview", some clues there http://support.microsoft.com/?id=307598
 
Back
Top