我的第一个页面:
<table class="table_form" cellpadding="3" cellspacing="1">
<tr>
<td class="titletd" style="height: 28px">借 用 人:</td>
<td colspan="3">
<asp:TextBox ID="userName" CssClass="input_text" ReadOnly=true runat="server" Width="205px"/>*
<asp:TextBox ID="ygid" CssClass="input_text"   Visible="false" Width="203px" runat="server"></asp:TextBox>
</td>
<td style="width: 100px; text-align: left">
<input id="Button1" type="button" class="self_button" value="..." onclick=" window.open('selectpeople.aspx name=select','SelWindow','width=700,height=450,toolbar=no,statubar=no,resizable=no');
                                " runat="server" /></td>
</tr>
</table>
第二个页面选择按钮的事件(返回值部分):
 Response.Write("<script language='javascript'>opener.document.all.userName.value='" + str_people + "';opener.document.all.ygid.value='" + str_peopleid + "';</script>");
            Response.Write("<script language='javascript'>window.close();</script>");现在问题是:第二个页面关闭后我在第一个页面的yyid.text和userName.text中也看到了传过来的值,上面也确实显示了.
但是为什么我定义一个变量后str_yyid,然后str_yyid=yyid.Text取值时为什么是空呢?取userName.text也一样.难道还需要做其它处理吗?