2
modalpopup이 데이터베이스에 새 레코드를 추가 한 후 gridview에서 데이터를 새로 고치려고 할 때가 있습니다. 필자는 운이없는 다음을 시도했다. 모달 팝업이 닫힌 후 업데이트 패널 내부에서 새로 고침 gridview가
this.gvSupressedRecommendations.DataBind();
this.UpdatePanel1.Update();
내가 가까이 메신저 알고 있지만이 새로 얻이 수없는 것 :
<cc2:ModalPopupExtender ID="mdlPopup" runat="server" OnOkScript="__doPostBack('<%= gvRecommendations.ClientID %>', '');" BackgroundCssClass="modalBackground"
TargetControlID="lbtnRecommendationsAddNew" PopupControlID="pnlAddNewRecommendation">
</cc2:ModalPopupExtender>
<asp:Panel ID="pnlAddNewRecommendation" runat="server" CssClass="confirm-dialog" style="display:none;" Width="500px">
<div class="inner">
<h2>New Suppressed Recomendation</h2>
<div class="base">
<table width="100%" cellpadding="5" cellspacing="0">
<tr>
<td align=left>
<asp:DropDownList ID="ddlRecomendations" runat="server" />
</td>
</tr>
<tr>
<td align="left">
<asp:Button ID="btnAddRecommendation" OnClick="btnAddRecommendation_Click" runat="server" Text="Submit" />
|
<asp:LinkButton ID="btnCancel" runat="server" Text="Cancel" ForeColor="Blue" />
<asp:LinkButton id="lbtnTopLeft" runat="server" CssClass="close" />
</div>
</td>
</tr>
</table>
</div>
</div>
</asp:Panel>
필자 또한 DB에 기록을 추가 한 후 행운과 함께이 추가했습니다.