ViewState无法放入多维数组?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim arr(,,) = CType(ViewState("state"), String(,,)) If arr Is Nothing Then ReDim arr(0, 0, 0) arr(0, 0, 0) = "0" End If TextBox1.Text = CStr(CInt(arr(0, 0, 0)) + 1) Dim a As Integer = CInt(TextBox1.Text) arr(0, 0, 0) = CStr(a) ViewState("state") = arr Catch ex As Exception MsgBox(ex.Message) End Try End Sub