4.4. Summary

A lot happened in this chapter. The framework for all screens is now developed and linked in with the business logic layer and the data access layer built in the previous two chapters. Most of the code is not in the pages themselves — it is either in the master page or in the business layer, and the pages the user sees become quite trivial to code.

Note the following key points to remember for the menu controls:

  • Records that do not have a ParentENTMenuItemId will appear on the tabs at the top of the screen.

  • Any record that has a ParentENTMenuItemId will appear on the side menu in the TreeView control.

  • The side menu can have nested nodes in the TreeView control. This is controlled by the ParentENTMenuItemId.

  • Use the DisplaySequence to set the order in which you want the menu item to appear.

  • If the menu item has a URL, it will appear as a link on the menu; otherwise, it will appear as a label.

  • The menu is cached in the Globals class.

The key points to remember when implementing a grid page are as follows:

  • Use the PaidTimeOffEditGrid.master page.

  • Add a MasterType tag in the HTML markup that points to the PaidTimeOffEditGrid.master page.

  • Inherit from the BasePage class.

  • Hook up the AddButton_Click event handler in the Page_Load event.

  • Add a Response.Redirect statement in the AddButton_Click event that redirects the user to the edit page and pass an ID of zero in the query string. Be sure to encrypt the query string.

  • Override the MenuItemName with the side menu or top menu that ...

Get ASP.NET 3.5 Enterprise Application Development with Visual Studio® 2008: Problem - Design - Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.