Microsoft .Net Mobile Question:
Download Job Interview Questions and Answers PDF
Explain a .NET Mobile example with details?
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>
<%@ 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 Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain how does .NET Mobile work? | Tell me .NET Mobile Emulators? |