2010-07-10 86 views
0

當我在網頁中使用response.redirect引用頁面時,它正在使用Internet Explorer。但是,當我使用Google Chrome瀏覽我的網站時,此功能也無效。即使我試圖使用response.write打印這些值,它在Google Chrome中也不起作用。 (我正在使用asp.net與c#)互聯網瀏覽器和谷歌Chrome瀏覽器之間的網址推薦區別

+0

那麼你的Response.Redirect的樣子?一個代碼示例會有所幫助。 – 2010-07-10 05:36:09

+0

Chrome瀏覽器不喜歡「位置」標題中的某些字符(大約一年前發生在我身上) - FF,Opera,IE和Safari沒有問題。檢查你的重定向字符串。 – 2010-07-10 05:50:58

回答

0

由於Response.Redirect是服務器端,它應該無關緊要什麼瀏覽器使用。

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

,或者如果您要重定向的應用程序之外,您需要使用FQDN

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