Skip to Content
ASP.NET 3.5 For Dummies®
book

ASP.NET 3.5 For Dummies®

by Ken Cox
February 2008
Intermediate to advanced
428 pages
8h 52m
English
For Dummies
Content preview from ASP.NET 3.5 For Dummies®

17.5. Adding an Administration Area

The administration area is for managing the users and the site. You allow access to the area only to users with the Administrators role. The Small Business Starter Kit doesn't have built-in administration functions. In this section, you create a simple page as an administration starting point.

17.5.1. Adding the Admin folder and a page

It's easier to secure entire folders than individual pages. For that reason, all administrative pages go into an Admin folder. Follow these steps to create a folder:

  1. In Solution Explorer, create a new folder called Admin (WebsiteNew Folder).

  2. Making sure to select a master page, add an ASP.NET page named Memberlist.aspx to the Admin folder.

Next, you create a page for verifying administration security.

17.5.2. Building the Membership List page

As a starter for the Admin section, you allow administrators to view the membership list in a GridView control. Follow these steps to add and configure the GridView:

  1. In Design view, from the Data category of the Toolbox, drop a SqlDataSource control into the ContentPlaceHolder area of the Memberlist.aspx page.

  2. Using the ASPNETDB.MDF database that you created in the previous section, "Creating the Membership Database," configure the SqlDataSource according to the following table:

    SettingValue
    Data connectionASPNETDB.MDF
    Retrieve data fromvw_aspnet_MembershipUsers
    ColumnsEmail, UserName, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9780470195925Purchase book