asp.net的Response.Write [英] asp.net Response.Write

查看:89
本文介绍了asp.net的Response.Write的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  Response.Write("<script>alert('Konaklama Başarıyla Eklendi')</script>");
  string url = "NewAccommodation.aspx?mID=" + mID;
  Response.Redirect(url);

上述code,它不显示,因为它后code线的警告框。如何解决呢?

Hi, on the above code, it does not show the alert box because of the code lines after it. How to fix that?

推荐答案

在你的极其有限的$ C $工作c,你有两个选择,因为我看到它... ...

Working on your exceedingly limited code, you have two options as I see it...

重定向到 NewAccommodation.aspx ,然后从那里写出了警报的剧本

Redirect to NewAccommodation.aspx and then write the "alert" script from there

或发送以下....

Response.Write("<script type='text/javascript'>")
Response.Write("alert('Konaklama Başarıyla Eklendi');")
Response.Write("document.location.href='NewAccommodation.aspx?mID=" + mID.ToString() + "';")
Response.Write("</script>")

这篇关于asp.net的Response.Write的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆