Okay, I now have the 'bids' application running successfully on my Win2K3/SQL2K server. For details on setting up the database, see my previous post. Here are a few additional notes on errata and other observations:
1. Page 410: In 'MenuForRegisteredUsers.aspx', the BoundColumn for "HighestBid" generated an error because there is no 'ID' property for a BoundColumn; deleting this attribute fixed it.
2. The 'Logout.aspx' page is included in the list on p.388, but the code for this page is not covered in the book. It is required for the system to work properly because it's the only place where the "EMail" cookie is cleaned up and the session is ended, so be sure to add it. Curiously, none of the other cookies set by the login function are cleaned up here, and they really should be.
3. Regarding the 'Item.vb
' tools file: The 'ItemDetails' class is not actually [u]used</u> anywhere. It may have originally been intended to be used as a 'properties bucket' for the 'Item' class, similar to the 'PersonDetails' and 'Person' classes, but this is not the case. In any event, it's curious that the properties are just directly exposed without being encapsulated within Get and Set methods.
4. Regarding the 'Register.aspx' page: The 'ModifyCustomer' function is not working. Everything seems to be coded properly, both in the codebehind and in the Person.vb
5. Regarding 'ViewMySaleItems.aspx': The DataGrid has an ItemTemplate element called "Accept Bid". Within this element is an asp:hyperlink element. The 'NavigateURL' attribute of this hyperlink element has a call to a function called 'FormatURL'. This function requires three expressions separated by commas. If you are going to put line breaks between these expressions when you're building the aspx file, be sure to separate them with underscores, otherwise you'll get an 'expression expected' error.
6. P.442: In the 'AcceptBid.aspx.vb
' file, the first line of the page_load event includes an 'LCase' function:
Dim strFrom As String = LCase(Request.ServerVariables("HTTP_REFERER"))
but the next line is looking for the following:
If InStr(strFrom, "ViewMySaleItems.aspx") > 0 Then [...]
however, this will fail, because the 'InStr' function is case sensitive.
One way to correct this is to edit 'Accept.aspx.vb
' as follows:
If InStr(strFrom, "ViewMySaleItems.aspx") > 0 Then
If InStr(strFrom, "viewmysaleitems.aspx") > 0 Then
If InStr(strFrom, "MenuForRegisteredUsers.aspx") > 0 Then
If InStr(strFrom, "menuforregisteredusers.aspx") > 0 Then
One final comment: there is no discussion in this chapter of validation controls, and very little mention of them in the book at all!:( This is a huge, gaping hole which seriously damages the book as a learning tool.
As with all the other Beginning Wrox books, this chapter (and this book) is okay as far as it goes, it's just that it doesn't go nearly far enough, and it leaves out a lot of really important details. Don't go through this book expecting that by the time you're through, you'll be ready to go out and start developing. Instead, get the Pro book,
and read through most of it or at least have it handy as a reference. [u]That</u> book (or something on a similar level) is what you'll [u]really</u> need.