Using ImageFields

You use ImageField to display an image stored on the server’s hard drive. You can’t use ImageField to display images stored in a database table.

The page in Listing 11.26 illustrates how you can use ImageField when creating a simple photo gallery (see Figure 11.18).

Figure 11.18. Using ImageField with the GridView control.

image

Listing 11.26. ShowImageField.aspx

images

images

The GridView in Listing 11.26 contains ImageField that looks like ...

Get ASP.NET 4 Unleashed 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.