<asp:Button ID="btnCheckPatientID" CssClass="cssbutton" runat="server" Text="Check"
OnClick="btnCheckPatientID_Click" />
<asp:ModalPopupExtender ID="btnCheckPatientID_ModalPopupExtender" runat="server"
PopupControlID="panelCheckPatient" TargetControlID="hiddenTargetControlForModalPopup"
BackgroundCssClass="modalbackground" CancelControlID="btnClose">
</asp:ModalPopupExtender>
<asp:Button runat="server" ID="hiddenTargetControlForModalPopup" Style="display: none" />
<div id="panelCheckPatient" class="modalpopup" style="display: none">
<iframe id="iframeCheckPatient" class="csstable" runat="server" width="550px" height="485px" scrolling="auto">
</iframe>
<table>
<tr>
<td align="right">
<asp:Button ID="btnClose" runat="server" CssClass="cssbutton" Text="Close" />
</td>
</tr>
</table>
</div>
即成代碼返回值父頁面
protected void btnCheckPatientID_Click(object sender, EventArgs e)
{
iframeCheckPatient.Attributes["src"] = "Check_Patient.aspx?patientID=" + txtPatientID.Text.Trim();
btnCheckPatientID_ModalPopupExtender.Show();
}
我有btnCheckPatientID的點擊開一個Ajax模式彈出。 在Modal Popup中加載一個包含Check_Patient.aspx頁面的iframe。所有工作都正常。
在Check_Patient.aspx中有Pass按鈕。 點擊按鈕,我必須返回一些值到父頁面。
我該怎麼做。 搜索在谷歌,但找不到任何幫助
您可以在子頁面上設置會話並獲取父頁面的值。 –
您好sain pradeep同意在會話中存儲值..如何關閉在iframe頁面(Check_Patient.aspx)中雙擊javascript中的模式彈出框 – John
請參閱此鏈接:-http://stackoverflow.com/questions/3876986/hide-modalpopup-from-iframe –