Q&A

Q1:Since guests to the Web site might make obscene comments in their guestbook entries, I'd like to be able to not have a guestbook entry displayed on the Web page until I approve it. How could I go about adding this functionality?
A1: To add this functionality, you would need to update the data model, adding a Show column to the GuestbookEntries table. This column could be of type bit, which essentially is a Boolean since it allows for only two values, 0 and 1.

The idea here is that a guestbook entry with a 0 value in its Show column has yet to be approved, while one with a 1 has been approved. Since you do not want a guestbook entry to display until it has been approved, when inserting a new guestbook entry from the AddEntry.aspx Web page, ...

Get SAMS Teach Yourself ASP.NET in 24 Hours 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.