解析petshop3.0的顶部信息
2006-04-22 14:13
387 查看
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用户控件.当用户登出的时候显示这个用户控件
一个是具有导航条的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用户控件.当用户登出的时候显示这个用户控件
相关文章推荐
- 解析petshop3.0的顶部信息
- 解析petshop3.0的顶部信息
- 解析Petshop 3.0 简单工厂(Simple Factory)模式
- 解析petshop3.0 的帐户管理
- 解析petshop3.0 的帐户管理
- 解析Petshop 3.0 简单工厂(Simple Factory)模式
- 解析petshop3.0 的帐户管理
- AF解析Json出错的时候 这样看提示信息
- PetShop 3.0 Database structure
- 不同版本(2.3,2.4,2.5,3.0,3.1)的Servlet web.xml 头信息
- eml文件解析实例,简历信息抓取工具
- GPRM/GNRMC定位信息的读取与解析
- AAC_LC用LATM封装header信息解析 Audio Specific Config格式分析
- dom4j解析properties文件 以解析oracle连接信息文件为例
- .NET三层经典架构PetShop3.0说明连载一(转)
- WIFI LOG信息解析
- PDFBox解析PDF文档信息(属性、内容、图片)
- 学习PetShop3.0(3)模仿购物车的简单可变类
- 利用选择题进行信息关注度研究案例解析
- Python模拟Web Fetion给好友发送信息(HTML解析和具体发送模块)