用Response.Redirect弹出一个新的页面

zfh198601 2008-04-12 03:08:17
Response.Redirect("pro_search1.aspx");
...全文
526 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
wlm1314 2008-04-24
  • 打赏
  • 举报
回复
mark
zfh198601 2008-04-21
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 CathySun118 的回复:]
Response.Write(" <script>window.open('链接') </script>")
[/Quote]


用Response.Write是可以实现,但是调用后在当前页面上会写入这条语句.

因为Response.Write是将数据输入到客户端
tinalucky 2008-04-14
  • 打赏
  • 举报
回复
Response.Write(" <script>window.open('链接','_blank') </script>")
CathySun118 2008-04-14
  • 打赏
  • 举报
回复
Response.Write("<script>window.open('链接')</script>")
深圳小武 2008-04-14
  • 打赏
  • 举报
回复
int id = 3;
string str=" <script> window.open('Default2.aspx?id="+id+"','_blank') </script> ";
Response.Write(str);

如果有多个参数的话就是这样
int id = 3;
string name = "testname";
string s=" <script> window.open('Default2.aspx?id="+id+"&name="+name+"','_blank') </script> ";
Response.Write(s);

参数接收
string a = Request.QueryString["id"];
string b = Request.QueryString["name"];
zfh198601 2008-04-14
  • 打赏
  • 举报
回复
Response.Write(" <script>window.open('链接','_blank') </script>")


我跳转的是带参数的?????

jinjazz 2008-04-14
  • 打赏
  • 举报
回复
上边有3种方法可以用
jinjazz 2008-04-14
  • 打赏
  • 举报
回复
参考blog

http://blog.csdn.net/jinjazz/archive/2007/11/16/1888066.aspx
http://blog.csdn.net/net_lover/archive/2007/09/24/1799094.aspx
zccmy22 2008-04-14
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 tinalucky 的回复:]
Response.Write(" <script>window.open('链接','_blank') </script>")
[/Quote]
TNT_1st_excellence 2008-04-14
  • 打赏
  • 举报
回复
[Quote=引用楼主 zfh198601 的帖子:]
Response.Redirect("pro_search1.aspx");
[/Quote]
什么问题?
wt3056 2008-04-12
  • 打赏
  • 举报
回复
什么问题?

110,502

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧