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.