传递值给父窗口

一、调用
  this .Button3.Attributes.Add( " onclick " " window.open('CopyToMan.aspx','','top=200,left=240,width=490,height=240') " );

二、返回
  string  strScript  =   " <script> "   +   " \r\n " ;
        strScript 
+=   " window.opener.document.form1['TextBoxCopyMan'].value=' "   +  ArchivesName  +   " ' "   +   " \r\n " ;   // 父窗口的对象
        strScript  +=   " window.opener.document.form1['HiddenField1'].value=' "   +  ArchivesID  +   " ' "   +   " \r\n " ;     // 父窗口的对象
        strScript  +=   " window.parent.close(); "   +   " \r\n " ;     
        strScript 
+=   " </script> "   +   " \r\n " ;
        
if  (( ! (IsClientScriptBlockRegistered( " clientScript " ))))
        
{
            RegisterClientScriptBlock(
"clientScript", strScript);
        }
 

你可能感兴趣的:(窗口)