在我的网页中,我在占位符中加载用户控件。当 ajaxcontroltoolkit 评级发生更改时,每个用户控件都会触发回发。我遇到的问题是,如果我使用
If (Not IsPostBack is Nothing)
占位符中的控件在帖子中消失。
我的 Page_Load 目前看起来像这样
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Session("ProId") = Nothing
Session("FolId") = Nothing
Dim ProId As Integer
If (Not Request.QueryString("ProjectID") Is Nothing) Then
ProId = Convert.ToInt32(Request.QueryString("ProjectID").ToString())
Session("ProId") = Request.QueryString("ProjectID").ToString()
End If
Dim FolId As Integer
If (Not Request.QueryString("FolderID") Is Nothing) Then
FolId = Convert.ToInt32(Request.QueryString("FolderID").ToString())
Session("FolId") = Request.QueryString("FolderID").ToString()
End If
objUser = New BSSiteUser(CInt(Page.User.SiteUser.intID))
objProject = New BSProject(ProId)
objFolder = New BSFolder(objUser.SiteUserID, FolId)
objOrganization = New BSOrganization(objProject.intOrganizationID, objUser.SiteUserID)
Me.Load_SubcontractorList()
Me.Load_EvaluationList(1)
Me.Load_EvaluationList(2)
Me.lblorganization.Text = objOrganization.CompanyName
Me.lblprojectname.Text = objProject.strProjectName
Me.lblprojectnumber.Text = objProject.strProjectNumber
Me.lbldatecreated.Text = Date.Now.Date.ToString()
End Sub
Load_EvaluationList 是加载用户控件的内容,如果我在这两个周围放置 IsPostBack 检查,控件就会消失,可能是什么问题