现在的问题是重新定向的窗口 在原来弹出的窗口中显示的。
我想要的效果是关闭弹出得窗口,然后重新定向到Search_List.aspx页面,并使此页面最大化。 protected void btnSearch_Click(object sender, EventArgs e)
{
string url;
url = "Search_List.aspx?cCusName=" + txtcCusName.Text + "&cCusCode1=" + txtcCusCode1.Text + "&cCusCode2="+txtcCusCode2 .Text ;
Response.Write("<script>window.close();</script>");
Response.Redirect(url); }
我想要的效果是关闭弹出得窗口,然后重新定向到Search_List.aspx页面,并使此页面最大化。 protected void btnSearch_Click(object sender, EventArgs e)
{
string url;
url = "Search_List.aspx?cCusName=" + txtcCusName.Text + "&cCusCode1=" + txtcCusCode1.Text + "&cCusCode2="+txtcCusCode2 .Text ;
Response.Write("<script>window.close();</script>");
Response.Redirect(url); }
解决方案 »
- 请问如何实现点击链接后下载flash文件
- asp.net 执行.sql文件
- 【求解】求一条简单的SQL语句!100分答谢~【求解】【求解】【求解】【求解】【求解】【求解】有满意答案立马结贴!
- 关于存储过程的输出参数问题
- |M| 服务器如何得到HTML页面中的checkbox的状态
- 求助 session 值 提交到数据库里显示 乱码
- 急救,在线等
- 电子商务网站时,有关物流(送货方式)?
- 试图运行项目时出错 ,不能调试 ,是什么原因
- 谁能给一个 Parameters 的例
- GlobalResources 和 LoalResources该用哪个?
- 一个超高难度的问题!!!!关于.NET提交FORM时自动验证画面上是否存在HTML标记的问题
{
window.open(url,"_blank","top=200,left=200,width=560,height=450,resizable=0,scrollbars=1,status=no,toolbar=no,location=no,menu=no'");
}function ShowDiv(id)
{
document.getElementById('test').style.display='block'
}
function closeDiv(id)
{
document.getElementById('test').style.display='none'
}
function reload(city_id,area_id)
{
window.opener.location='BDealwith.aspx?city='+city_id+'&buss='+area_id
}
function reloadDIV(city,areaid)
{
window.location='BDealwith.aspx?city='+city+'&buss='+areaid
}
function CloseWin()
{
window.close();
}
function CloseWin()
{
window.close();
}
</script><a href="JavaScript:reloadDIV('<%=CityName %>','<%# Eval("BusinessArea") %>');closeDiv('test');">
function test()
{ var newwin=window.open("about:blank","test","width=300,height=220");
newwin.document.writeln("<input type='button' value='try' onclick='window.close();window.opener.location=\"test.html\";window.opener.resizeTo(screen.width,screen.height);window.opener.moveTo(0,0)' />");
}
</script>
<input type="button" value="try" onclick="test()"/>Response.Write("<script>window.close();window.opener.location=\"Search_list.aspx\";window.opener.resizeTo(screen.width,screen.height);window.opener.moveTo(0,0);</script>");
为什么不使用js实现?应该尽量少客户端与服务器间的通信 var url = "Search_List.aspx?cCusName=" + document.getElementById(txtcCusNameID).value + "&cCusCode1=" + document.getElementById(txtcCusCode1ID).value + "&cCusCode2="+document.getElementById(txtcCusCode2ID).value;
字符串组织完毕,然后你可以使用 window.location=url
或者 window.open(url) 随你喜欢
===============================================================
您的方法,还是无法新定向到Search_List.aspx页面 而是在原来弹出的窗口中显示的
加上红色部分不行吗?