zoukankan      html  css  js  c++  java
  • 解析petshop3.0的顶部信息

           petshop定义了三个顶部信息的用户控件,一个是首页的NavBarNoMenu.ascx,这个用户控件没有产品导航条

    一个是具有导航条的NavBar.ascx,两个页面存在一个相同的函数,判断用户是否登录,然后做出不同的显示




         

     1// properties
     2        public bool hidecategorymenu = false;
     3
     4        private void Page_Load(object sender, System.EventArgs e)
     5        {
     6            // Put user code to initialize the page here
     7            //ShowMenuArea();
     8            ShowLoggedInArea();
     9        }

    10
    11        // display different items if person is logged in or not
    12        private void ShowLoggedInArea() {
    13
    14            if (Request.IsAuthenticated != true{
    15                
    16                areaLoggedIn.Visible = false;
    17                areaLoggedOut.Visible = true;
    18
    19            }
     else {
    20                
    21                areaLoggedIn.Visible = true;
    22                areaLoggedOut.Visible = false;
    23
    24            }

    25        }


    最后还有一个静态的SignOutNavBar.ascx用户控件.当用户登出的时候显示这个用户控件
  • 相关阅读:
    Lucene全文检索
    数据库设计样例
    tortoisegit 保存用户名密码
    ServletContextListener 解析用法
    !! 浅谈Java学习方法和后期面试技巧
    佳能2780打印机老出5100错误
    蓝屏
    股市口诀
    如何准确进行T+0操作
    通达信:显示K线图日期
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/382125.html
Copyright © 2011-2022 走看看