Adding Discount Information to the Product Details Page

The same discount information needs to be displayed on the product details page as well. Adding this information involved making changes to the ProductDetails code behind class and the .aspx page as well.

ProductDetails.aspx.cs

The ProductDetails code behind class needed only slight modifications to support the product special functionality. As with the product selection class, the special price or discount of any product that qualifies must be displayed. Listing 8.6 shows the method in which this functionality was implemented.

Listing 8.6. The PopulateDetails Method
 protected void PopulateDetails() { OrderManager ordermanager = new OrderManager(); decimal promoprice; // Put user code to ...

Get Building e-Commerce Sites with the .NET Framework 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.