我有一个用于各种网页的类,同一个类可以在同一个页面中使用两次。类成员在代码的各个部分都可以访问,所以我这样声明......
Public Class Page
Inherits System.Web.UI.Page
Dim UserDetails as New User
Dim ThisMonthDD as New DeadlineDates
Dim LastMonthDD as New DeadlineDates
Protected Sub Page_Load()
If Not IsPostBack Then
UserDetails.GetUserDetails(Request.ServerVariables("LOGON_USER").Split("\")(1))
ThisMonthDD.BaseDate = Now()
..........
Else
..........
End If
End Sub
Protected Sub SomeOtherEvent()
Tb_claimdatedeadline = ThisMonthDD.UserSubmitDeadline
.......
End Sub
如何阻止类在回发时重置并对页面类中的所有事件可见?