w3schools    w3Schools
Search W3Schools :
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

XML Certification
Download XML editor
Custom Programming
Table of contents
.NET Mobile
Mobile HOME
Mobile Intro
Mobile Example
Mobile Emulators
Mobile Forms
Mobile Events
Mobile Input
Mobile Validation
Mobile Lists
Mobile Selection
Mobile Images
Mobile Utilities

Mobile Reference

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Tutorials
W3Schools Forum

Helping W3Schools


.NET Mobile Example

previous next

The Mobile ASP.NET Page

Mobile Controls are the main building blocks of mobile applications.

Mobile Controls are similar to Web Controls in ASP.NET.

The following ASP.NET page displays "Hello W3Schools" as a WML card in a WML enabled cell phone:

<%@ Page
Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register
Assembly="System.Web.Mobile" %>
<mob:Form runat="server">
   <mob:Label runat="server">Hello W3Schools</mob:Label>

The Page directive tells ASP to use (inherit) mobile page handling instead of regular page handling (like the one used for traditional browsers).

The Register directive defines the prefix that will be used for mobile controls. We have used "mob",  but you can use any prefix you like.

The <mob:Form> element tells the server to create a mobile form control.

The <mob:Label> element tells the server to create a mobile label control with the text "Hello W3Schools".

When the ASP .NET page executes, it will produce the following output to a WAP enabled mobile phone:

<?xml version='1.0'?>
<p>Hello W3Schools</p>

and this output will be produced for a Pocket PC:

<form id="ctrl1" name="ctrl1" method="post"
<div>Hello W3Schools</div>


.NET Mobile will generate WML code for WAP enabled cell phones and HTML code for devices like the Pocket PC.

By detecting the browser, .NET Mobile will output correct content, providing developers with a powerful tool to develop single applications that will serve many different mobile devices.

previous next

Altova® MissionKit® - Integrated suite of XML tools

The Altova MissionKit is a suite of intelligent XML tools, including:

XMLSpy® – industry-leading XML editor

  • Support for all XML-based technologies
  • Graphical editing views, powerful debuggers, code generation, & more

MapForce® – graphical data mapping tool

  • Drag-and-drop data conversion with code generation
  • Support for XML, DBs, EDI, Excel® 2007, text, Web services

StyleVision® – visual stylesheet designer

  • Drag-and-drop stylesheet design for XML & databases
  • Output to HTML, PDF, RTF, Word 2007, & more

And more…

Try before you buy with a free fully functional 30-day trial

Download today


Get Your Diploma!

W3Schools' Online Certification Program is the perfect solution for busy professionals who need to balance work, family, and career building.

The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.

The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.

The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.

The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.

The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).

ASP.NET Web Hosting
Web Hosting
$15 Domain Name
Save $20 / year!
Buy UK Domain Names
Register Domain Names
Cheap Domain Names
Cheap Web Hosting
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Custom Programming
FREE Trial or Demo
Web Content Manager
Forms,Web Alerts,RSS
Download XML editor
FREE Flash Website
FREE Web Templates
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
Home HOME or Top of Page Validate   Validate   W3C-WAI level A conformance icon Printer Friendly  Printer Friendly

W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.