页面传递值问题? Response.Write("<script language=javascript>window.opener.location=window.opener.location.href;window.close();</script>"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以用Session试试,第二页面添加Session.Add("value", "data");第一页面if (Session["value"] != null){TextBox.Text = (string)(Session["value"]);} b 页面中去掉opener =null 而且你不能写在服务器提交事件中,它是不会提交的,模式窗口会在另外一个窗口进行提交,所以你会看见b页面闪了一下,然后关闭。实际上是创建了另外一个b页面,并关闭了。解决方法://js把你的服务器端按钮写成html按钮事件,执行返回值和关闭。 要想在b页面中进行提交服务器事件,需要使用Iframe .// 写一个C 页面,让a页面中弹出c页面// Page:c.html<html><body><Iframe src="b.aspx" width="100%" height="100%"></iframe></body></html> <input type="button" value="按钮" onclick="DoClick();">function DoClick(){ var GetValue = null; GetValue = showModalDialog(......); document.getElementById("InputBox") = GetValue;}B页面:private void BtnDetailUpdate_Click(object sender, System.EventArgs e){ //关闭窗体;涮新FrmSale.aspx Response.Write("<script language='javascript'>window.returnValue="YourValue";window.close();</script>");} showModalDialog要返回值,必须一个窗体容器的 就得用SESSION,用购物车的原理 先道谢各位!偶在.net 2003环境下 reaperwu(RQ) :偶就是看了你以前回答的问题,你现在的答案:B页面:BtnDetailUpdate应是一服务器端控件吧问题仍在: 关闭不了第二页,只不过闪一下,还在第二页 Seeko0(阿 枫) : 正在试,能够详细的代码吗? 第一个页面没错;第二个页面文件中:<input type=button ID=btn_Return value= "确 定" onclick="ReturnTemplet();">function ReturnTemplet(){ window.parent.returnValue=document.Form1.tb_Templet.value; window.close();} Seeko0(阿 枫) :方法可以第二个页面中要处理服务器端控件。 怎样在登录页获取登录者的Profile属性? 在asp.net 3.5 AJAX控件TabContainer中使用ckeditor出现一个很奇怪的现象,请看下面详细说明: 怎么调试asp.net mvc的源代码 内容页修改母版页内容 多表查询有同名列的问题 请教一个有关ASP的问题 菜鸟datalist itemtemplate的菜鸟问题 compare viladator 关于打开Excel显示到Datagrid中, 谢谢 Calendar控件日期多选如何改变背景色 如何取得上一个网页的文件名或URL?????????? 各位,我想找个可以可靠发送EMAIL的事例程序,请帮忙!
第一页面
if (Session["value"] != null)
{
TextBox.Text = (string)(Session["value"]);
}
解决方法://js把你的服务器端按钮写成html按钮事件,执行返回值和关闭。
// 写一个C 页面,让a页面中弹出c页面// Page:c.html<html>
<body>
<Iframe src="b.aspx" width="100%" height="100%"></iframe>
</body>
</html>
{
var GetValue = null;
GetValue = showModalDialog(......); document.getElementById("InputBox") = GetValue;
}B页面:
private void BtnDetailUpdate_Click(object sender, System.EventArgs e)
{
//关闭窗体;涮新FrmSale.aspx
Response.Write("<script language='javascript'>window.returnValue="YourValue";window.close();</script>");
}
reaperwu(RQ) :
偶就是看了你以前回答的问题,你现在的答案:
B页面:BtnDetailUpdate应是一服务器端控件吧
问题仍在: 关闭不了第二页,只不过闪一下,还在第二页
Seeko0(阿 枫) :
正在试,能够详细的代码吗?
第二个页面文件中:
<input type=button ID=btn_Return value= "确 定" onclick="ReturnTemplet();">
function ReturnTemplet()
{
window.parent.returnValue=document.Form1.tb_Templet.value;
window.close();
}