if (FormsAuthentication.GetRedirectUrl(UserID, false).ToLower().EndsWith("default.aspx")) 
{
FormsAuthentication.SetAuthCookie(UserID, false);
//弹出窗口
                    Server.Transfer("VerifySignIn.aspx");
}
else 
{
FormsAuthentication.RedirectFromLoginPage(UserID, false);
}
这段代码是我从一个写好的项目里拷贝出来的,我看不懂,请哪位大侠给我解释一下这里面每条语句的意思,

解决方案 »

  1.   

    没有那些类的实现,这样也很难说清楚每一条语句的意思啊!
    if里面估计是判断要跳转的页面是不是default.aspx
      

  2.   

    FormsAuthentication.SetAuthCookie(UserID, false);
    验证票据附加到cookieFormsAuthentication.RedirectFromLoginPage(UserID, false);
    转到发出请求的页面
      

  3.   

    FormsAuthentication.GetRedirectUrl(UserID, false).ToLower().EndsWith("default.aspx")) 这句是什么意思
      

  4.   

    当前页 的目录中含有default.aspx
    跳到default.aspx页面
      

  5.   

    请问哪有FormsAuthentication这方面的资料,我想具体了解一下
      

  6.   

    http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpqstart/html/cpsmpnetsamples-aspnetsecurity.asp
    http://www.lemongtree.com/htmls/6c647206-ea77-42bb-b5d6-6393c55bc936.aspx
      

  7.   

    如果是从default.aspx页来的,登陆后导航到VerifySignIn.aspx.aspx,否则从哪儿来回哪儿去。
    应该是这个意思。