Q1:In the first example in this hour, we saw how to allow the user to specify a customer ID, which would cause the information for that particular customer to be displayed. However, if there were no customers with the supplied customer ID, then the DataGrid simply did not display. How can the Web page be enhanced so that if there are no matching customers, a helpful message like “There are no customers with the supplied Customer ID” is displayed instead of nothing?
A1: In the ShowSingleCustomer.aspx example we examined in this hour, the user could enter a customer ID, and the customer with that particular customer ID would have his or her information displayed in a DataGrid. If, however, there were no customers whose customer ID matched the ...

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.