ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources]

G. andrew Duthie; matthew Macdonald

نسخه متنی -صفحه : 873/ 588
نمايش فراداده

Image.NET 1.1, disposable

System.Web.UI.MobileControls (system.web.mobile.dll)class

The Image control displays the image specified by the ImageUrl property. Because different mobile devices support different image formats, you will almost always use device-specific <Choice> elements to ensure that each type of device receives a different ImageUrl (which will point to a different image format). For example, an image formatted as a

.gif file will be displayed on HTML-capable browsers, but will not be displayed on WML-capable browsers. For WML-capable browsers, you need an image formatted as a

.wbmp file. The Image control itself does not provide any ability to convert images from one format to another, or modify any image characteristics. (For example, if a client supports only monochrome images, the Image control will not automatically convert a color image to monochrome.)

In some cases, the ImageUrl will not contain the URL for an image, but a scheme that indicates device-specific information. For example, WML 1.1 phones that support glyphs recognize the symbol: scheme. On an i-more phone, the ImageUrl "symbol:63726" maps to a heart icon.

public class 

Image : MobileControl, System.Web.UI.IPostBackEventHandler { // Public Constructors public

Image ( ); // Public Instance Properties public string

AlternateText {set; get; } public string

ImageUrl {set; get; } public string

NavigateUrl {set; get; } public string

SoftkeyLabel {set; get; } }

Hierarchy

System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) MobileControl(System.Web.UI.IAttributeAccessor) Image(System.Web.UI.IPostBackEventHandler)

Returned By

System.Web.UI.MobileControls.Adapters.HtmlImageAdapter.Control, System.Web.UI.MobileControls.Adapters.WmlImageAdapter.Control