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">
Devicespecific>
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":
XML Version = "1.0"?>
Advertisements>
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"%>
Sub Calchanged (Sender As Object, E AS Eventargs)
Lab1.text = "You SELECTED" & C1.SelectedDate
Activeform = F2
End Sub
script>
<
MOBILE
: Form id = "f1" runat = "server">
<
MOBILE
: Calendar ID = "C1"
OnSelectionChanged = "Calchanged" runat = "server" />
MOBILE
: Form>
<
MOBILE
: Form id = "f2" runat = "server">
<
MOBILE
: Label id = "lab1" runat = "server" />
MOBILE
: Form>
In this example, the calendar is displayed in the first form, when the user selects data from the calendar, the selected date is displayed in the new page. PhoneCall control
When the user selects text this mobile page Displays text "Tove's Number" and phone number (555) 555-5555.
The PhoneCall Control
<% @ PAGE
Inherits =
"System.Web.ui.MobileControls.MobilePage"%>
<% @ Register
Tagprefix = "mobile"
Namespace = "system.web.ui.mobileControls"
AskMBLY = "System.Web.Mobile"%>
<
MOBILE
: Form runat = "server">
<
MOBILE
: PhoneCall Runat = "Server"
Phonenumber = "(555) 555-5555"
Text = "TOVE's Number"
AlternateFormat = "{0}" />
MOBILE
: Form>
The attribute "allternateformat" here is {0}. Set to this display will appear as a text.
If you use a value {1} it will be displayed as "phonenumber".
You can also use the following to make alternateformat = "{0} IS {1}". "TOVE's Number IS (555) 555-5555" will be displayed at this time.
UTILITY control
Name
FUNCTION
ADROTATOR
Displays Advertisements
Calendar
Displays a calendar
Phonecall
Calls a Telephone Number
To learn more about MSDN.
(Translator Note: The above is a entry
ASP.NET
The simple portrait description of the mobile page is very simple, I hope it can help the netizens just started, of course, I will still recommend more.
MSDN
There are a lot of very detailed information there, and this simple article is over. thanks for reading. Thank you for criticism, especially English
J
),thank you very much. )