The Image control The Label control

257 ListItemCollection.RemoveAtindex where index is the position of the item to be removed from the listbox. The number of items in the drop-down listbox is provided by the ListItemCollection objects Count property. Three properties of the individual ListItem objects also make it possible to work with the items in the list. The Text property contains the text of the ListItem object as its displayed in the listbox. The Value property contains the value associated with the ListItem object. Finally, the Selected property returns a Boolean indicating whether the item is selected.

6.3.1.4 The Image control

The Image control displays an image on a web page. Its HTML syntax is: asp:Image id=ImageName runat=server ImageUrl=string AlternateText=string ImageAlign=NotSet|AbsBottom|AbsMiddle|BaseLine| Bottom|Left|Middle|Right|TextTop|Top The ImageUrl attribute contains the URL at which the image is found. The AlternateText attribute defines the text to be displayed in the event that the browser either does not support or is configured to not display images. The ImageAlign attribute determines the alignment of the image in relation to other elements on the page. All three attributes correspond to identically named properties of the Image class. The value of the ImageAlign property is a member of the ImageAlign enumeration and can be one of the following: ImageAlign.AbsBottom The images bottom edge is aligned with the bottom edge of the largest element on the same line. ImageAlign.AbsMiddle The middle of the image is aligned with the middle of the largest element on the same line. ImageAlign.Baseline The images bottom edge is aligned with the bottom edge of the first line of text. ImageAlign.Bottom The images bottom edge is aligned with the bottom edge of the first line of text. ImageAlign.Left The image is aligned on the left edge of the web page, with text wrapping on the right. ImageAlign.Middle The middle of the image is aligned with the bottom edge of the first line of text. ImageAlign.NotSet The images alignment is not defined. 258 ImageAlign.Right The image is aligned on the right edge of the web page, with text wrapping on the left. ImageAlign.TextTop The images top edge is aligned with the top edge of the highest text on the line. ImageAlign.Top The images top edge is aligned with the top edge of the highest element on the same line.

6.3.1.5 The Label control

The Label control typically displays static text. Perhaps the simplest of controls, it has the following HTML syntax: asp:Label id=Label1 Text=label runat=server The text displayed by the label is represented by the Text attribute. It directly corresponds to the identically named property of the System.Web.UI.WebControls.Label control.

6.3.1.6 The ListBox control