2

在我的表單中,我有一個listview和一個panel,它用作updatepanel中的彈出窗口。關於模式彈出式擴展程序的部分渲染更新面板關閉

我使用modalpopupextenderlistviewltemcommand上動態創建彈出窗口。

這裏是我的代碼來打開彈出

protected void LstCreativeBin_ItemCommand(object sender, ListViewCommandEventArgs e) 
    { 
     switch (e.CommandName) 
     { 
      case "UploadFile": 
       ListViewDataItem currentItem = (ListViewDataItem)e.Item; 
       DataKey currentDataKey = LstCreativeBin.DataKeys[currentItem.DisplayIndex]; 
       int contestid = Convert.ToInt32(currentDataKey["participantSlno"]); 
       IframeEdit.Attributes.Add("src", "Uploadfile.aspx?id=" + Convert.ToString(contestid)); 
       ModalPopupExtender1.Show(); 
       break; 
     } 
    } 

我的問題是在頁面刷新,即使它是updatepanel內。我已將LstCreativeBin_ItemCommand添加到更新中的異步觸發器。

什麼這裏需要的是:

  1. 打開彈出異步。
  2. 刷新關閉彈出窗口的更新面板。

回答

1

怎麼樣打開modalpopupextender而不去代碼隱藏...如果你用動態控件打開它,你可以點modalpopupextender到的TargetControlID像一個隱藏的控制一個虛擬的,你可以添加到每個列表視圖項一個onclick到hidden_​​control.click()或$ find(模態).show()