我的第一个页面:
<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也一样.难道还需要做其它处理吗?
<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也一样.难道还需要做其它处理吗?
解决方案 »
- 如何改变webservice的URL地址。。
- 关于Gridview中的CommandField
- mp4或者在flv 在ipad2 上面的浏览器无法播放问题
- 发一个CSDN不足的问题,大家一起讨论下.
- VS2005 页面发布 log4net写日志失效,FileStream 创建文件失败
- JS的一个问题
- 安装好petshop后,http://localhost/MSPetShop可以访问,但是vsnet2003 打开web项目出错: 不能从服务器得到工程!!!
- Parallel.ForEach并行运行时数据会遗漏
- net在执行搜索和分页时想调用前台一段JS 代码,触发条件是什么啊?
- 请教下vs2005里面可以像1.1版本一样在网页里用静态变量吗?
- textbox,datagrid等控件,什么情况下要使用viewstate=true
- w3wp.exe线程锁文件问题!!急!!!
Response.Write("<script>alter('" + userName.Text + "');</script>");
一直显示的是空的.我的page_load事件里的代码 if (IsPostBack)
{
}
{
}