Mobile device's web application development ---- (image and utility)

zhaozj2021-02-16  51

Mobile .NET image

Moving .NET displays the type of different images on different device types.

Image control

Different mobile devices have different compatibility.

Image control allows developers to specify different types of images for different device types.

Image type

Some mobile devices displays a GIF image, some display BMP or WBM images, and the Image control allows you to specify different images for each suitable image type.

This mobile page displays an image:

<% @ PAGE

Inherits =

"System.Web.ui.MobileControls.MobilePage"%>

<% @ Register

Tagprefix = "mobile"

Namespace = "system.web.ui.mobileControls"

AskMBLY = "System.Web.Mobile"%>

<

MOBILE

: Form runat = "server">

<

MOBILE

: Image Runat = "Server">

MOBILE

: Image>

MOBILE

: Form>

When this page is displayed on the Pocket PC, a GIF image will be displayed. The WBMP or BMP image will be displayed based on the collected characteristics on the phone.

Mobile .NET Utility

The Utility control supports complex user interfaces through very few code.

ADROTATOR control

This mobile page displays different ads:

<% @ PAGE

Inherits =

"System.Web.ui.MobileControls.MobilePage"%>

<% @ Register

Tagprefix = "mobile"

Namespace = "system.web.ui.mobileControls"

AskMBLY = "System.Web.Mobile"%>

<

MOBILE

: Form runat = "server">

<

MOBILE

: Adrotator runat = "server"

AdvertisementFile = "Advertisements.xml">

MOBILE

: Adrotator>

MOBILE

: Form>

This is the ad (AD) file called "Advertisements.xml":

image1.gif image1.bmp image1.wbmp http://www.1.com < AlternateText> Visit 1 image2.gif image2.bmp image2.wbmp http: //www.2.com

image3.gif image3.bmp image3.wbmp http://www.3.com < AlternateText> Visit 3

Calendar control

This also display a calendar:

<% @ PAGE

Inherits =

"System.Web.ui.MobileControls.MobilePage"%>

<% @ Register

Tagprefix = "mobile"

Namespace = "system.web.ui.mobileControls"

AskMBLY = "System.Web.Mobile"%>