語言:VB, 環境:Visual Studio 2010中MultiView2.ActiveViewIndex不改變視圖
我有一個MultiView2一個DropDownList:視圖2,和如果下拉的選擇的索引是5,那麼該視圖應該更改爲View3,但不起作用,我將DropDown的AutoPostBack屬性設置爲True,兩個視圖都包含UpdatePanel。我在IF聲明中明確地指出了這一點,除了MultiView2.ActiveViewIndex = 1
之外,其他所有內容都發射了。 這是到目前爲止我的代碼... 這是SelectedIndexChanged事件
If drpDownSecurityQuestion.SelectedIndex = 0 Then
txtAnswer.Enabled = False
ElseIf drpDownSecurityQuestion.SelectedIndex > 0 And drpDownSecurityQuestion.SelectedIndex < 5 Then
txtAnswer.Enabled = True
ElseIf drpDownSecurityQuestion.SelectedIndex = 5 Then
txtAnswer.Enabled = False
drpDownSecurityQuestion2.SelectedIndex = 5
MultiView2.ActiveViewIndex = 1
End If
我覺得你有一些錯誤的使用UpdatePanen。解釋你如何使用下拉菜單,更新面板和多視圖。告訴什麼是錯誤的是什麼? – 2012-03-18 18:23:54
好吧,所以我在UpdatePanel中使用DropDown,在View中使用UpdatePanel,在MultiView中使用View。謝謝。 – user959631 2012-03-18 21:50:34