Creating Banners Dynamically with Tiled Backgrounds

Before I leave the topic of dynamically created banners, I want to add something to the previous application to show you how easy it is to fancy it up. I took the simple banner creation application and added the capability for users to select one of four background images. As a replacement for the single red rectangle, the background images were tiled into the background of the banner. This is actually a fairly easy change to make to the code that you saw in the Button1_Click() method. You can see the application executing in Figure 16.4. Notice that the banner has a background of white bricks.

Figure 16.4. This version creates banners with tiled backgrounds.

Look at the code now in Listing ...

Get Special Edition Using® Microsoft® ASP.NET 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.