父页面:a.aspx
其中javascirpt 脚本如下:
showModalDialog 模态打开子窗体,返回值到父窗体  function opendata(strUrl)//showModalDialog
    }

如果需要把txt_Send_Email的readonly设置为true 则,需要增加C#代码:
showModalDialog 模态打开子窗体,返回值到父窗体txt_Send_Email.Attributes["readonly"= "true";
否则如果在其他地方设置则不能读出txt_Send_Email的值

javascript 里面执行单击按钮操作
showModalDialog 模态打开子窗体,返回值到父窗体document.getElementById("btn_get_value").click();
showModalDialog 模态打开子窗体,返回值到父窗体
//btn_get_value 是按钮名称
showModalDialog 模态打开子窗体,返回值到父窗体


后台C#程序如下:
showModalDialog 模态打开子窗体,返回值到父窗体txt_Send_Email.Attributes.Add("ondblclick""opendata('frmChoose_UserForMail.aspx')");//
其中:txt_Send_Email是TextBox 控件
打开子页面:frmChoose_UserForMail.aspx
子页面(功能:实现关闭子页面,并且返回数据):
showModalDialog 模态打开子窗体,返回值到父窗体   string strScr = "<script language=javascript> window.returnValue='qq'; " + "window.close(); </script>";
showModalDialog 模态打开子窗体,返回值到父窗体        Page.RegisterClientScriptBlock(
"Close", strScr);  

关闭页面脚本:
showModalDialog 模态打开子窗体,返回值到父窗体string str_strScr = "<script language=javascript> window.close();</script>";
showModalDialog 模态打开子窗体,返回值到父窗体            Response.Write(str_strScr);
关闭页面不需要提示
showModalDialog 模态打开子窗体,返回值到父窗体 string str_strScr = "<script language=javascript>     window.opener =null; window.close();</script>";
showModalDialog 模态打开子窗体,返回值到父窗体        Response.Write(str_strScr);

2005里面验证通过


下面的代码可以好好研究研究

showModalDialog 模态打开子窗体,返回值到父窗体 <script language="javascript" type="text/javascript">      
showModalDialog 模态打开子窗体,返回值到父窗体        
function BtnChooseApprover()
>

相关文章: