Databases Reference
In-Depth Information
Note in Figure 15-11 that the area outside the ContentPlaceHolder is where you
can apply all the settings to be part of the Master Page, and the area inside the
ContentPlaceHolder is where the content of other pages will get emerged.
4. You will add an image to the Master Page, but before you do that you need to add
a folder to contain image files. Right-click the project, click New Folder, and name
it Images. To add images to this folder, right-click it and select Add Existing Item.
Select the item you want to add, and then click Add. The image will be added to
this folder and made available for use anywhere in this project.
n Note For the purposes of this example, we are using an image named Pearl HR.JPG , which is also
provided with the code in the Images folder. You can use any other picture from your machine.
5. Drag an Image control to just above the ContentPlaceHolder1. Just to ensure that
you have added the Image control correctly above the ContentPlaceHolder1,
switch to Source view and look at the asp:Image tag, which should be above the
asp:ContentPlaceHolder tag as shown in Figure 15-12.
Figure 15-12. Analyzing position of controls in Source view of a Master Page
6. Switch to Design view, select the image, and go to the Properties window. Click the
ellipsis button beside the ImageUrl property. This will take you to the Select Image
dialog box, as shown in Figure 15-13. Select the Pearl HR.JPG image located under
the Images folder and click OK.
Search WWH ::




Custom Search