.Net Mobile

  Home  Microsoft .Net Technologies  .Net Mobile


“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

2⟩ 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

 146 views

4⟩ 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.

 153 views

5⟩ 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

 143 views

6⟩ 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>

 143 views

7⟩ 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.

 157 views

8⟩ 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.

 162 views

9⟩ 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>

 154 views

10⟩ 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.

 173 views

11⟩ 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>

 156 views

12⟩ 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>

 165 views

13⟩ Can you explain <MobileLink> element .NET Mobile with example?

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>

 153 views

14⟩ 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.

 150 views

15⟩ 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

 152 views

17⟩ 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>

 150 views

19⟩ 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>

 167 views

20⟩ 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.

 151 views