Microsoft .Net Mobile Interview Questions & Answers
Download PDF

Microsoft .Net Mobile frequently Asked Questions by expert members with experience in .Net Mobile. These interview questions and answers on Microsoft .Net Mobile will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. So get preparation for the Microsoft .Net Mobile job interview

22 .Net Mobile Questions and Answers:

.Net Mobile Interview Questions Table of Contents:

.Net Mobile Job Interview Questions and Answers
.Net Mobile Job Interview Questions and Answers

1 :: What is .NET Mobile Images control. Explain with an example?

Various mobile devices have different displaying capabilities. The Image control enables developers to specify different types of images fir different devices.

Example: Devices which display GIF, some devices which display BMP or WBMP images.

<%@ Page Inherits= "System.Web.UI.MobileControls.MobilePage"%>

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

<Mobile:Form runat="server">
<Mobile:Image runat="server">
<DeviceSpecific>
<Choice ImageURL="image1.gif" />
<Choice ImageURL="image1.bmp" />
<Choice ImageURL="image1.wbmp" />
</DeviceSpecific>
</Mobile:Image>
</Mobile:Form>

2 :: Do you know TextBox and TextView controls of .NET Mobile?

The textbox control in .NET mobile application is used to display a single line of text, whereas, a textview control is used to display multiple lines of text. The text property of the textview control also accepts HTML tags to specify formatting of the text inside the control.

3 :: What is .NET Mobile Input Validation. Explain with an example?

Validation controls are used to validate an input control. They provide a message if the validation fails on the control. By default validation is applied on the command event of an input control. One can disable this by setting the input control’s causes validation property to false.

Example:

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

<script runat="server">

private void Page2(Object Sender, EventArgs e)
{
If (Page.IsValid)
{
ActiveForm=f2;
text2.Text="You are " + age.text + " years old";
}
}

</script>

<Mobile:Form id="f1" runat="server">
<Mobile:CompareValidator runat="server" ControlToValidate="txtage" Type="Integer" ValueToCompare="12" Operator="GreaterThanEqual"> You must be at least 12</Mobile:CompareValidator>

<Mobile:Label runat="server">What is your Age?</Mobile:Label>
<Mobile:TextBox id="txtage" runat="server" />
<Mobile:Command OnClick="Page2" runat="server">Submit</Mobile:Command>
</Mobile:Form>

<Mobile:Form id="f2" runat="server">
<Mobile:Label id="text2" runat="server" />
</Mobile:Form>

This will display a message if the user input is less than 12

4 :: What is .NET Mobile Utility Controls. Explain with an example?

.NET mobile has a variety of utility complex controls:

AdRotator: A control which displays different images one by one.
Calendar: Standard calendar control for mobile devices.
PhoneCall: Selects the number displayed and calls that number.

Example: Displays text Mike’s Number, and dial the number (91) 1111-111 when the user selects the text.

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

<Mobile:Form runat="server">
<Mobile:PhoneCall runat="server" PhoneNumber="(91) 1111-111" Text="Mike's number" AlternateFormat="{0}" />
</Mobile:Form>

5 :: What is password attribute of the textbox control of .NET Mobile?

When the password attribute of the textbox is set to true, it acts as a password input box displaying only stars(*).

6 :: What is .NET Mobile Lists. Explain with an example?

There are 2 types of lists:

The selectionlist control supports drop down lists, check boxes and also radio buttons.
The list control supports selection from a list or menu. It has a display and a value property.

Example: Display price of a car selected by user.

<script runat="server">

private void Show_Price(Object sender, ListCommandEventArgs e)
{
text1.Text=e.ListItem.Text + "=" + e.ListItem.Value;
ActiveForm=f2;
}
</script>

<Mobile:Form id="f1" runat="server">
<Mobile:List runat="server" OnItemCommand="Show_PriceList">
<Item text="Camry" value="$25,000" />
<Item text="Audi" value="$32,000" />
<Item text="BMW" value="$54,000" />
</Mobile:List>
</Mobile:Form>

<Mobile:Form id="f2" runat="server">
<Mobile:Label runat="server" id="text1" />
</Mobile:Form>

7 :: What is the numeric attribute of the textbox control in .NET Mobile?

When the numeric attribute of the textbox is set to true it accepts numeric numbers only. However, this behavior can only be observed in mobile devices and not standard web browsers

8 :: Explain .NET Mobile Input controls?

.NET provides a variety of input controls to enable interaction form the user:

Numeric input: The textbox has a numeric attribute which if set to true accepts only numeric values.
Password input: The textbox has a password attribute which when set to false displays stars(*) in the textbox as the user types in value

9 :: What are .NET Mobile controls features?

.NET mobile controls features:

Build web pages for many types of mobile devices instead of targeting specific ones.
Allow creation of user controls with events
Offer same features as ASP.NET Pages and server controls along with support to work with multiple devices.
Allow customizing the output for a specific device by adding a new adapter for the control.
Can create new controls which can use inheritance or composition.
Allow adding support for an entirely new device by using adapter extensibility with no changes to individual applications.
The <Mobile:Link> element enables a user to navigate between 2 forms in a page. Eg:

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

<Mobile:Form id="form1" runat="server">
<Mobile:Label runat="server">Hello World1
</Mobile:Label>
<Mobile:Link runat="server" NavigateURL="#form2">Form2
</Mobile:Link>
</Mobile:Form>

<Mobile:Form id="form2" runat="server">
<Mobile:Label runat="server">Hello World2
</Mobile:Label>
<Mobile:Link runat="server" NavigateURL="#form1">Form1
</Mobile:Link>
</Mobile:Form>

11 :: Explain .NET Mobile SelectionList Control?

The selectionlist control supports drop down lists, check boxes and also radio buttons.

Example: Allow user to select a car

<%@ Page Inherits= "System.Web.UI.MobileControls.MobilePage"%>

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

<script runat="server">
private void Car_Click(Object sender, EventArgs e)
{
ActiveForm=f2;
t1.text=cars.Selection.Value;
}
</script>

<Mobile:Form id="f1" runat="server">
<Mobile:SelectionList runat="server" id="cars" >
<Item Text="Camry" Value="$25,000" />
<Item Text="Audi" Value="$32,000" />
<Item Text="BMW" Value="$54,000" />
</Mobile:SelectionList>
<Mobile:Command runat="server" OnClick="Car_Click" Text="Submit" />
</Mobile:Form>

<Mobile:Form id="f2" runat="server">
<Mobile:Label id="t1" runat="server" />
</Mobile:Form>

12 :: Explain .NET Mobile Events?

.NET mobile controls expose events which are device independent. They have an object model with programmable properties, methods and events.

Eg:
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage"%>
<%@ Register TagPrefix="Mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

<script runat="server">
string age;

private void AgeClick(Object sender, EventArgs e)
{
age=text1.Text;
ActiveForm=Form2;
}
private void Form2_Activate(Object sender, EventArgs e)
{
message.Text="You are " + age + " years old";
}

</script>

<Mobile:Form id="form1" runat="server">
<Mobile:Label runat="server">Age?</Mobile:Label>
<Mobile:TextBox runat="server" id="text1" />
<Mobile:Command runat="server" OnClick="AgeClick" Text="Submit" />
</Mobile:Form>

<Mobile:Form id="form2" runat="server" OnActivate="Form2_Activate">
<Mobile:Label runat="server" id="message" />
</Mobile:Form>

13 :: Explain .Net Mobile automatic paging?

NET mobile supports automatic paging for a variety of mobile devices. Paging is handled differently for different controls. Eg: For paging in a panel, the content controls of the panel still remain grouped inside the panel.

14 :: What is .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. A single mobile form can encapsulate multiple mobile controls in it. Compared to ASP.NET, a single mobile page can consist of multiple mobile forms.

<mob:Form id=”form1” runat="server">
<mob:Label id=”lbl1” runat="server">Hello World</mob:Label>
</mob:Form>

<mob:Form id=”form2” runat="server">
<mob:Label id=”lbl2” runat="server">Hello World2</mob:Label>
</mob:Form>

15 :: What is .Net Mobile automatic paging?

NET mobile supports automatic paging for a variety of mobile devices. Paging is handled differently for different controls. Eg: For paging in a panel, the content controls of the panel still remain grouped inside the panel.

16 :: What is the difference between .Net Mobile Pages and ordinary .NET web page?

.NET Mobile pages are similar to ordinary .NET Webpages.

<%@ 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>

Notice the only difference being the tag mob which uses the System.Web.UI.MobileControls library instead of the asp tag.

17 :: Tell me .NET Mobile Emulators?

Applications built using MMIT can be tested and viewed using a variety of emulators.

► Using Browser: Mobile web pages detect the browser, hence can be tested using the standard browsers like IE6.
► Openwave: This is the most commonly used browser for Internet-enabled mobile phones.
► Nokia Mobile Internet Toolkit: This is a toolkit from Nokia which enables testing for a variety of Nokia phones/devices.
► Windows Mobile Development Platform: This is a Microsoft platform used to test applications for Windows Mobile O/s

18 :: Explain a .NET Mobile example with details?

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>

19 :: Explain how does .NET Mobile work?

Sequence of steps for MMIT application execution:

a) A mobile client requests for a webpage
b) The request travels through the internet
c) The request reaches IIS on the server
d) .NET Framework handles the request and processes it
e) ASP.NET compiles the page
f) MMIT takes care of any mobile device specific requirements
g) Page is sent to the client.

20 :: Explain the components required to develop mobile applications with .NET Mobile?

Prerequisites for MMIT:

Windows 2000/2003/2008R2 server with IIS
ASP.NET Framework
MMIT
IE 6 or above
A WAP based simulator for testing.

21 :: Explain is development of a mobile web application with ASP.NET is very easy?

Developing a mobile application is as simple as building any website using ASP.NET. The only difference being the tags of the form i.e.

Normal ASP.NET Webpage

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

For Mobile

<%@ 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>

MMIT takes care of all the mobile device requirements. Thus, the developer is free from such concerns

22 :: Explain how to develop mobile applications using Microsoft Mobile Internet Toolkit (MMIT) or .NET Mobile?

Steps to develop mobile applications using MMIT:

a) Start with a new ASP.NET page
b) Include a reference to System.Mobile.UI
c) Add various mobile controls on the page as the need be.
.Net Mobile Interview Questions and Answers
22 .Net Mobile Interview Questions and Answers