网址浏览器和谷歌浏览器浏览器之间的推荐区别

时间:2010-07-10 05:31:12

标签: c# asp.net

当我在我的网页中使用response.redirect引用页面时,它正在使用Internet Explorer。但是,当我使用谷歌浏览器浏览我的网站时,这种方法无效。即使我尝试使用response.write打印值,它也无法在Google Chrome中使用。 (我正在使用带有c#的asp.net)

1 个答案:

答案 0 :(得分:0)

由于Response.Redirect是服务器端,因此您使用的浏览器无关紧要。

Response.Redirect("~/My/New/Page.aspx"); // Where the tilde (~) is the application root

或者如果您要在应用程序外部重定向,则需要使用FQDN

Response.Redirect("http://example.com");