Examining the Source Code

When visiting the AddEntry.aspx Web page, the user will enter name, message, and perhaps e-mail address. Upon entering this information, the user will click the Add Comment button, which will submit the Web form, causing the ASP.NET Web page to be posted back. When this postback occurs, we want to make sure that the validation Web controls report valid data (that is, that Page.IsValid is True) and then add a new record to the database table GuestbookEntries.

Throughout the past eight hours, we have seen numerous examples of how to retrieve information from a database by using the SELECT Data Method Code Builder. With this helpful tool, we are able to visually construct an appropriate SQL query, which then automatically ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with O’Reilly online learning.

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