这是aspx页面的一些代码。我不确定我应该使用公共变量还是 viewState
Partial Class madeUpName
Inherits System.Web.UI.Page
Public vin As String = ""
Public stk As String = ""
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'inside of here i use the variables
end sub
Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
'inside of here I also use the same variables
end sub
我应该在我的类中为页面使用 viewState 变量还是公共变量?似乎他们都实现了同样的目标。