Mobile .NET example
Mobile ASP.NET page
Moving controls are blocks primarily building mobile applications.
Moving controls and web controls in ASP.NET are very similar.
If you are not familiar with ASP.NET development, you can leave here first go to ASP.NET TUTORIAL learning.
This ASP.NET page displays "Hello W3Schools" on a mobile phone that can identify WML. (Translator Note: WML is a XML-based tag language).
<% @ PAGE
Inherits = "System.Web.ui.MobileControls.MobilePage"%>
<% @ Register
Tagprefix = "mobile"
Namespace = "system.web.ui.mobileControls"
AskMBLY = "System.Web.Mobile"%>
<
MOBILE
: Form runat = "server">
<
MOBILE
: Label Runat = "Server"> Hello W3Schools
MOBILE
: Label>
MOBILE
: Form>
The PAGE instruction here tells ASP to use (inherit) is the mobile page processing replacement formal page processing (just like a traditional browser).
The Register directive definition here will be used in the mobile control, but you can use any prefix you like.
Here the
The
This ASP.NET page output
When the ASP page is executed, it will generate the following output to mobile phones that can use WAP (Wireless Application Protocol)
XML Version = '1.0'?>
DOCTYPE WML PUBLIC
'- // WAPFORUM // DTD WML 1.1 // en'
'http://www.wapforum.org/dtd/wml_1.1.xml'>
Hello W3Schools p>
card>
wml>
The following different outputs will be generated on the Pocket PC: