.NET Mobile example with explanation

.NET Mobile example with explanation.

Example:
<%@ Page Inherits="System.Web.UI.MobileControls.MyPage" %>

<%@ Register TagPrefix="mob" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

<mob:Form runat="server">
    <mob:Label runat="server">Hello World</mob:Label>
</mob:Form>

This is similar to a traditional ASP.NET webpage. The only difference being the tag mob which uses the System.Web.UI.MobileControls library.

Output for a WAP Enabled Mobile device:
<?xml version='1.0'?>
<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN' 'http://www.wapforum.org/DTD/wml_1.1.xml'>

<wml>
<card>
    <p>Hello World</p>
</card>
</wml>

Output for a Pocket PC:
<html>
<body>

<form id="ctrl1" name="ctrl1" method="post" action="example.aspx">
    <div>Hello World</div>
</form>

</body>
</html>
Describe .NET Mobile Emulators
.NET Mobile Emulators - Applications built using MMIT can be tested and viewed using a variety of emulators.....
.Net Mobile Pages vs. ordinary .NET web page
.Net Mobile Pages - .NET Mobile pages are similar to ordinary .NET Webpages. only difference being the tag.....
.Net Mobile Forms
.Net Mobile Forms - .NET Mobile Forms are specialized Web forms which can work on various mobile devices. Each Mobile Page must have at least one mobile form.
Post your comment