Public Class index
Inherits System.Web.UI.Page
Dim arr(9) As Integer
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
arr(0) = 23
End Sub
Protected Sub bntInsert_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bntInsert.Click
arr(0) = 999
End Sub
Protected Sub bntShow_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bntShow.Click
txtid.Text = arr(0).ToString
End Sub
End Class
结果是当我单击 bntInsert 并在 bntShow 之后它仍然在 txtid 中显示值“23”。请帮我!