Subpage C # background code: [csharp] /// <summary> /// assign the set value to the parent page /// </summary> /// <param name = "count"> to be passed </param> void SetValueToParentPage (int count, string strPersons) {StringBuilder jsStr = new StringBuilder (); jsStr. append ("var retValue = new Object ();"); if (count = 0) {jsStr. appendFormat ("retValue = null;");} else {jsStr. appendFormat ("retValue. nums = '{0}'; ", count); jsStr. appendFormat ("retValue. nam Es = '{0}'; ", strPersons);} jsStr. append ("window. returnValue = retValue; window. close (); "); ClientScript. registerStartupScript (GetType (), "close", jsStr. toString (), true);} parent page front-end js: [javascript] function OpenPerChoose (url) {var openobj = window; if (typeof (window. dialogArguments) = "object") {openobj = window. dialogArguments;} var returnValue = showPopWin (url, 800,600, openobj); if (returnValu E! = Null) {document. getElementById ("<% = txtQualifiedNums. clientID %> "). value = returnValue. nums ;}} [javascript] // pop-up window function showPopWin (url, width, height, returnFunc) {width = parseInt (width) + 30; height = parseInt (height) + 30; return window. showModalDialog (url + "& Datetime =" + GetTime (), document, "dialogWidth:" + width + "px; dialogHeight:" + height + "px; help: 0; status: 0; scroll: auto; center: 1; resizable: 1; ") ;}< th style =" width: 100px; "> Number of trainees: </th> <td style = "width: 50px;"> <asp: textBox ID = "txtQualifiedNums" runat = "server" Width = "50px" ReadOnly = "true"> </asp: TextBox> </td>