Microsoft .Net Mobile Question:

Explain a .NET Mobile example with details?

Tweet Share WhatsApp

Answer:

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>

Download .Net Mobile PDF Read All 22 .Net Mobile Questions
Previous QuestionNext Question
Explain how does .NET Mobile work?Tell me .NET Mobile Emulators?