我在login.aspx 中的登陆按钮中调用
response.redirect("/webapp/main.aspx")
页面变成空白,地址栏中的内容没有变化,仍然是 http://localhost/webapp/login.aspx我在别的页面里面用 response.redirect 是没有问题的。

解决方案 »

  1.   

    response.redirect("~/webapp/main.aspx") or response.redirect("~/main.aspx")
      

  2.   

    应该没有这样的问题吧,加上response.end试一试
      

  3.   

    看看你的main.aspx中是不是有问题,或者又回调到login.aspx页,设个段点检查一下
      

  4.   

    是不是你的main.aspx有驗證什麼,比如Session之類的,失敗就返回login.aspx页
      

  5.   

    我遇到过:Response.Redirect提交时是取不到Form中控件的数据
    如下:
    Response.Redirect("GOGG04.aspx");
    后来我就改为Server.Transfer如:
    Server.Transfer("GOGG04.aspx") ;
    你试试看!
      

  6.   

    是否执行到response.redirect("/webapp/main.aspx")?
    断点调试过了没
      

  7.   

    我也觉得应该是没有执行到response.redirect("/webapp/main.aspx")这一句,你检查这一句是否有条件限制或者前面的response.end终止执行了?
      

  8.   

    通常是main.aspx有检测,因为检测不通过被main.aspx跳转到login.aspx了
      

  9.   

    在不在一个web应用程序下,或者说在不在一个虚拟目录下
      

  10.   

    用Response.Write("<script>location.href='url'</script>")
      

  11.   

    有default.aspx?web.config配置了login.aspx?
    default.aspx加response.redirect("/webapp/main.aspx")
      

  12.   

    稀里糊涂就好了,可能是我修改了 wwwroot 的文件目录,然后 .net 的客户端代码就找不到了。用了 smartnavigate 的页面好像是需要 aspnet_client文件夹中 客户端代码的
    谢谢各位了,