弹出窗口和父窗口的值传递问题。 用模态窗口.可以参考FreeTextBox的那个图片上传窗口. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用Session试试看.main.aspx--------------------------------------<script language="c#" runat="server">……void bttA_Click(Object sender,System.EventArgs e){ Session["temp"]=textbox.Text; Response.Redirect("pop.aspx");}……</script></head><body><form id="form1" runat="server" ><asp:textbox ID="txtA" runat="server" /><asp:Button ID="bttA" runat="server" OnClick="bttA_Click" /><br/></form></body></html>pop.aspx------------------------------<script runat="server" language="c#">void Page_Load(Object sender,System.EventArgs e){ message.Text=Session["temp"].ToString();}</script></head><body><asp:textbox ID="message" runat="server" /></body></html> window.opener.window.document.all.textbox.value = window.document.textbox.value; 完整代码:main.aspx-------------------------<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>main</title><script language="c#" runat="server">void bttA_Click(Object sender,System.EventArgs e){ Session["temp"]=txtA.Text; Response.Redirect("pop.aspx");}</script></head><body><form id="form1" runat="server"><asp:TextBox ID="txtA" runat="server" /><br><asp:Button ID="bttA" runat="server" OnClick="bttA_Click" text="点击打开新的网页" /></form></body></html>pop.aspx---------------------------------<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>pop</title><script language="c#" runat="server">void Page_Load(Object sender,System.EventArgs e){ txtB.Text=Session["temp"].ToString();}</script></head><body><form id="form2" runat="server"><asp:TextBox id="txtB" runat="server" /></form></body></html> QQ功能的讨论,进来评论就有分拿 怎么得网页元素的位置? 求解vs2008的问题 WPF4发现重大BUG,希望大家奔走相告 一个取款的项目 c#用正则表达式限制textbox窗体控件只能输入数字和小数点 怎么作 关于两个Repeater控件的用法 当点击标题栏上的关闭按钮时有Messagebox弹出,这个在什么地方设置呢?(winform) 小弟不知道这个该怎么处理,请高手指点,万分感谢(急急急 !!) 当前上下文中不存在名称"txtfileencoding" 链接传参数的时候,有的时候出错有的时候不出错?? 最好能给个源代码.C#(HTTP+POST+XML)
<script language="c#" runat="server">
……
void bttA_Click(Object sender,System.EventArgs e)
{
Session["temp"]=textbox.Text;
Response.Redirect("pop.aspx");
}
……
</script></head>
<body>
<form id="form1" runat="server" >
<asp:textbox ID="txtA" runat="server" />
<asp:Button ID="bttA" runat="server" OnClick="bttA_Click" />
<br/>
</form>
</body>
</html>pop.aspx------------------------------
<script runat="server" language="c#">
void Page_Load(Object sender,System.EventArgs e)
{
message.Text=Session["temp"].ToString();
}</script>
</head>
<body>
<asp:textbox ID="message" runat="server" />
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>main</title>
<script language="c#" runat="server">
void bttA_Click(Object sender,System.EventArgs e)
{
Session["temp"]=txtA.Text;
Response.Redirect("pop.aspx");
}</script>
</head><body>
<form id="form1" runat="server">
<asp:TextBox ID="txtA" runat="server" />
<br>
<asp:Button ID="bttA" runat="server" OnClick="bttA_Click" text="点击打开新的网页" />
</form>
</body>
</html>pop.aspx---------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>pop</title>
<script language="c#" runat="server">
void Page_Load(Object sender,System.EventArgs e)
{
txtB.Text=Session["temp"].ToString();
}
</script>
</head><body>
<form id="form2" runat="server">
<asp:TextBox id="txtB" runat="server" />
</form>
</body>
</html>