Getting Started with Microsoft Mobile Internet Toolkit (MMIT)

Last Updated: Nov 09, 2025
5 min read
Legacy Archive
Legacy Guidance: This article preserves historical web development content. For modern .NET 8+ best practices, visit our Tutorials section.

Introduction

MMIT, also known as .NET Mobile, extends the .NET framework's functionality to enable mobile application development for devices like cell phones and PDAs. With the .NET framework, you can create two types of mobile applications: web-based applications that execute on the server and are accessed via the internet, or local applications that run directly on mobile devices.

Web-based mobile applications require MMIT, while local applications use the compact framework. This guide focuses on MMIT for creating server-based mobile web applications.

System Requirements

Before developing MMIT-based mobile applications, you'll need to set up your development environment with these components:

  • Windows 2000 with all service packs installed
  • Internet Information Services (IIS) 5 or higher
  • Internet Explorer 5.5 or later
  • Microsoft Mobile Internet Toolkit
  • ASP.NET Framework

The Power of Device-Agnostic Development

MMIT lets you create a single application that works across various mobile devices. The toolkit automatically translates your application code according to the target device. For example, it generates WML code for WAP-enabled cell phones, HTML for Pocket PC devices, and cHTML for i-mode phones. This means you'll write your code once and MMIT handles the device-specific rendering.

Architecture of .NET Mobile Applications

Just as ASP.NET has web controls, .NET Mobile provides mobile controls. The specification includes three key components:

  • Mobile Page contains your mobile application and serves as the top-level container.
  • Mobile Forms are the building blocks of your page, with each form representing a screen or view.
  • Mobile Panel constitutes sections within mobile forms, helping you organize content logically.

Understanding Mobile Control Categories

User Interface Controls
These controls appear directly in the user's interface:

User Interface Controls Copy

UI Controls Example
<mobile:Form id="Form1" runat="server">
<mobile:Label id="Label1" runat="server" Text="Welcome"/>
<mobile:TextBox id="TextBox1" runat="server"/>
<mobile:Image id="Image1" runat="server" ImageUrl="logo.gif"/>
<mobile:Link id="Link1" runat="server" NavigateUrl="page2.aspx" Text="Next Page"/>
<mobile:List id="List1" runat="server">
<Item Text="Option 1" Value="1"/>
<Item Text="Option 2" Value="2"/>
</mobile:List>
</mobile:Form>
  • Form represents the container for other controls and manages the display flow.
  • Image displays graphic content on mobile devices.
  • TextBox provides a single-line text input field.
  • TextView offers multi-line text display capabilities.
  • Link creates hyperlinks for navigation between pages.
  • List presents selectable options to users.

Utility Controls

These controls provide advanced functionality beyond basic display:

Utility Controls Copy

Utility Controls Example
<mobile:AdRotator id="AdRotator1" runat="server"
AdvertisementFile="ads.xml"/>

<mobile:Calendar id="Calendar1" runat="server"
OnSelectionChanged="Calendar1_SelectionChanged"/>

<mobile:PhoneCall id="PhoneCall1" runat="server"
PhoneNumber="1-800-555-1234"
Text="Call Us"/>
  • AdRotator displays rotating advertisements from an XML configuration file.
  • Calendar presents an interactive calendar for date selection.
  • PhoneCall initiates phone calls on devices with telephony capabilities.

Validation Controls

These controls ensure data integrity by validating user input:

Validation Controls Copy

Validation Example
<mobile:Form id="Form1" runat="server">
<mobile:Label id="Label1" runat="server" Text="Enter age:"/>
<mobile:TextBox id="txtAge" runat="server"/>

text

<mobile:RangeValidator id="RangeValidator1" runat="server"
    ControlToValidate="txtAge"
    MinimumValue="18"
    MaximumValue="100"
    Type="Integer"
    ErrorMessage="Age must be between 18 and 100"/>

<mobile:CompareValidator id="CompareValidator1" runat="server"
    ControlToValidate="txtAge"
    ValueToCompare="21"
    Operator="GreaterThanEqual"
    Type="Integer"
    ErrorMessage="Must be 21 or older"/>

<mobile:RegularExpressionValidator id="RegExValidator1" runat="server"
    ControlToValidate="txtEmail"
    ValidationExpression="\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"
    ErrorMessage="Invalid email format"/>

<mobile:Command id="Submit" runat="server" Text="Submit"/>

</mobile:Form>
  • CompareValidator compares user input against a fixed value or another input field.
  • RangeValidator checks whether input falls within a specified range.
  • RegularExpressionValidator verifies that input matches a specified pattern, perfect for validating email addresses, phone numbers, or postal codes.

Building Your First Mobile Application

Here's a complete example showing form navigation and data handling:

Complete Mobile Application Copy

Two-Form Flow
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="C#" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<script runat="server"> void Submit_Click(Object sender, EventArgs e) { lblResult.Text = "Hello, " + txtName.Text; ActiveForm = Form2; } </script>

<mobile:Form id="Form1" runat="server">
<mobile:Label runat="server" Text="Enter your name:"/>
<mobile:TextBox id="txtName" runat="server"/>
<mobile:Command id="cmdSubmit" runat="server"
Text="Submit" OnClick="Submit_Click"/>
</mobile:Form>

<mobile:Form id="Form2" runat="server">
<mobile:Label id="lblResult" runat="server"/>
<mobile:Link runat="server" NavigateUrl="#Form1" Text="Back"/>
</mobile:Form>

Conclusion

The development of MMIT-based mobile applications enables users to access information from anywhere, making mobile devices more powerful and practical for everyday tasks. By leveraging MMIT's device-agnostic architecture and comprehensive control library, you can build mobile web applications that reach users across all mobile platforms with minimal development effort.

Quick FAQ

How does MMIT know which markup language to generate for different devices?

MMIT uses device detection built into ASP.NET, which examines the HTTP headers sent by the requesting device. Based on the device's browser capabilities and supported markup languages, MMIT automatically selects the appropriate rendering (WML, HTML, cHTML, etc.) without requiring any changes to your code. This device detection is configured in the machine.config and web.config files.

Can I customize the appearance of mobile controls for different devices?

Yes, you can use device-specific templates and style sheets. MMIT supports DeviceSpecific and Choice elements that let you define different layouts and styles based on device capabilities. For example, you can show rich graphics on devices with larger screens while displaying text-only versions on basic phones. You'll wrap your customizations in DeviceSpecific tags and specify filters based on device characteristics.

What's the difference between mobile forms and panels in MMIT?

Mobile Forms represent individual screens or views in your application and serve as containers for controls. Mobile Panels are sections within forms that help organize content logically. Think of forms as pages and panels as divisions within those pages for better content organization. Each form can contain multiple panels to structure your interface effectively.

Do I need to write separate code for different mobile devices?

No, MMIT's power lies in device-agnostic development. You write your code once using mobile controls, and MMIT automatically translates it to the appropriate markup for each device - WML for WAP phones, HTML for Pocket PCs, and cHTML for i-mode phones. This dramatically reduces development time and maintenance overhead.

Back to Articles