在我的網頁中,我正在加載佔位符內的usercontrols。當ajaxcontroltoolkit評分發生變化時,這些用戶控件中的每一個都會觸發回發。我遇到的問題是,如果我使用關於Postback佔位符控件正在消失
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
我試圖把大部分的載荷送入Page_Init,但阿賈克斯的評價控制不斷得到復位。我錯過了什麼。我瞭解回發問題 – mattgcon
您是否將評級控制的CurrentRating屬性保存到視圖狀態,然後在回發中將其設置回來? –
我使用的等級控制其設定等保護小組pntrating_Changed(BYVAL發件人爲對象,BYVALË作爲AjaxControlToolkit.RatingEventArgs) e.CallbackResult = e.Value OnBubbleCalculate(E) 結束子 – mattgcon