Книга: C# 2008 Programmer

Making the Publisher Field Editable

Making the Publisher Field Editable

Now select a record, and click the Edit link. Notice that the publisher is not editable (see Figure 17-21).

Figure 17-21

Here's how to make the publisher field editable. In the source view of Default.aspx, insert the following highlighted code:

<asp:TemplateField HeaderText="Publisher">

This creates a dropdown list within the GridView control (under the Publisher column) and displays a list of publishers available.

Press F5 to debug the application again. A title's publisher can now be changed (see Figure 17-22).

Figure 17-22

Оглавление книги

Генерация: 1.037. Запросов К БД/Cache: 3 / 1
Вверх Вниз