Displaying the Output

Your ASP.NET application is pretty straightforward. The .aspx file for the web form is shown in Example 16-3.

Example 16-3. Displaying the output

<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="SalesDisplay.Sales" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> <title>WebForm1</title> <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0"> <meta name="CODE_LANGUAGE" Content="C#"> <meta name=vs_defaultClientScript content="JavaScript"> <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5"> </head> <body MS_POSITIONING="GridLayout"> <form id="SalesReport" method="post" runat="server" title="Sales Report"> <asp:Label ID="lblMsg" Runat="server"> The data found here is screen scraped from Amazon and stored in a local database. The data is updated every 15 minutes. This is a work in progress. </asp:Label><br> Last Updated: <asp:Label id="lblLastUpdate" Runat="server" text="<%# lastUpdate %>" /> &nbsp; Show <asp:TextBox id=txtShowRecords Runat="server" AutoPostBack="True" Width="20" text="<%# showRecords %>" /> Records <br><br> <b>ASP Titles</b> <asp:DataGrid id="dgASPSalesRank" CellPadding="5" OnItemDataBound="Item_Bound" AutoGenerateColumns="False" HeaderStyle-BackColor="PapayaWhip" BorderColor="#000099" AlternatingItemStyle-BackColor="LightGrey" HeaderStyle-Font-Bold=true Width="900" runat="server"> <columns> <asp:templatecolumn HeaderStyle-Width ="10"> ...

Get Programming C#, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.