Decoding the ASP.NET Whidbey WebAdmin site

by lichen 2/14/2004 11:39:00 PM

Except the WebAdminPage class, almost the entire source code of WebAdmin site is available in the C:\WINDOWS\Microsoft.NET\Framework\v1.2.30703\ASP.NETWebAdminFiles directory. I decided to take a look how Microsoft developers “each their own dog food“. I actually leant a few.

1. The Web Admin site uses master page to have consistent look and feel. It is possible to inherit a master page from another master page. Both webAdminButtonRow.master and webAdminNoButtonRow.master files inherits from webAdmin.master file. The child page could access the members of the parent through Member.member call. It is also need to overide each content area to expose it to the child page, such as:

2. The Web Admin site supports both forms and Windows authentication. The following code is used to hide the logout link for the forms authertication:

public void Page_Init(object s, EventArgs e) {

signOut.Visible = Request.IsAuthenticated && Context.User.Identity is FormsIdentity;

}

Note that the line is in Page_Init instead of Page_Load. According to the doc, Page_Init fires before page state is restored.

3. The navigation bar uses a repeater controls to load Tabs setting stored in the machine.config file. Simple and elegant.

4. The site uses Request.ApplicationPath to construct the path for image. Wonder what would happen is the app is wwwroot. Guess it would never happen.

5. The manage users.aspx page use datagrid control (why not dataview control?). The page also contains a multiview control that allows editing the role of selected users. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | ASP.NET

Related posts

Comments are closed

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Pages

    Recent comments

    Authors

    Tags

      Disclaimer

      The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

      © Copyright 2012

      Sign in