Lab 04: Code Implementation Report
Back to Lab 04 Dashboard
1. Introduction
This lab involves converting the Pine Valley Furniture Company HTML prototypes into dynamic ASP.NET Web Forms
using VB.NET. The solution implements server-side logic including user authentication, session management,
role-based access control, database connectivity via ADO.NET, and the ASP.NET Page Life Cycle demonstration.
2. Implementation Details
The project consists of the following ASP.NET Web Forms:
- Login.aspx: The entry point of the application. Provides a login form with username and
password fields. Validates credentials against the database and creates a session for authenticated users.
- UserRegistration.aspx: A registration form for new customers, collecting details such as
name, password, address, and contact information. Data is inserted into the CUSTOMER_T table.
- Products.aspx: Displays products using a Repeater control. Includes search functionality
with partial match support. Allows users to place orders directly from the product listing.
- Orders.aspx: An order placement form that captures delivery details (contact, address,
postal code). Automatically associates orders with the logged-in customer.
- Catalog.aspx: An admin-only page for managing the product catalog. Visibility is controlled
via role-based access using ASP.NET Panel controls.
- Payment.aspx: A payment processing page for completing transactions.
- HelpPage.aspx: Provides user guidance and help documentation.
- PageLifeCycle.aspx: Demonstrates the ASP.NET Page Life Cycle by logging key events
(PreInit, Load, PreRender, Unload) and displaying their execution order.
3. Design Decisions
The application is built using ASP.NET Web Forms with VB.NET code-behind files. A shared
stylesheet.css provides consistent styling across all pages. Navigation is implemented using a
consistent navbar with ASP.NET HyperLink controls. Session variables are used for authentication, storing the
logged-in user's name and role. The Catalog page uses an ASP.NET Panel with conditional visibility to restrict
access to admin users only. Database operations use ADO.NET with parameterized queries for security. The logout
functionality clears the session and redirects to the login page.