下面这是我配置的两个节点  
<location path="Admin">
<system.web>
<authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location><authentication mode="Forms">
<forms name="xxx" loginUrl="admin/default.aspx" protection="All" timeout="30"/>
</authentication>
我想要做的是。我要控制后台页面直接点击跳到管理员登陆页面,登录成功后跳到default。aspx页面,登录失败继续登录。。各位大虾帮忙看看谢谢

解决方案 »

  1.   

     loginUrl="admin/login.aspx" 
      

  2.   

    loginUrl="admin/login.aspx" 
    这是先登录才能进行程序的操作,如果登录成功后在跳转就是在登录页面
    做了,
    bool  test=登录成功的方法; 返回一个bool值;举例
    if(test=true){
      Response.Redirect("default.aspx");
    }else{
     Response.Redirect("Login.aspx");
    }
      

  3.   

    http://localhost:4565/Weber/Login.aspx
    这个是我登陆页面
    看和下面的不同,
    当我点击登录的时候提示我登陆成功。跳转
    http://localhost:4565/Weber/login.aspx?ReturnUrl=%2fWeber%2fadmin%2fdefault.aspx
    变成这个样子了。
     if (this.t_code.Text.ToString() == Convert.ToString(Session["CheckCode"]))
                        {
                             Response.Write("<script>alert('登录成功!');location.href='admin/default.aspx'</script>");
                        }
                        else
                        {
                            this.t_code.Text = "";
                            Response.Write("<script>alert('验证码错误!')</script>");
                        }
    用这种方式跳转不可以吗
      

  4.   

    看看这张帖子吧,论坛里面很多问题已经解答了,http://topic.csdn.net/u/20100706/08/7272c012-6d1e-48bd-b33b-95adbfa43c7c.html