Creating Mobile ASP.NET Applications


Apart from developing device-based applications to be individually distributed and deployed to the device, the Web mechanism of application access through a browser has always been there with devices that are wirelessly connected either through a local area wireless network (such as networks utilizing products based on 802.11b and the like) or more cellular or data networks, which are typically wide area networks (WANs). Such devices (such as phones and PDAs) often have a browser that allows similar Web browsing capability, but in a limited fashion. In some scenarios, markup languages other than HTML (for instance WML ”Wireless Markup Language) must be developed so that the browsers can appropriately render the devices. Such an application area is really the focus on Mobile ASP.NET applications. Using a set of controls known as Mobile ASP.NET controls, ASP.NET can be used to develop online applications for such scenarios using the same underlying framework. With Visual Studio .NET 2003, the application supports integrated Mobile ASP.NET development as well.

You can create a Mobile ASP.NET application by using the appropriate project wizard (Figure 5.27).

Figure 5.27. The ASP.NET Mobile Web Application project wizard.

Developing the rest of a Mobile ASP.NET application is similar to that of a Web application, but with a restricted set of mobile controls. Similar to Windows-device applications, components can be dragged from the Mobile Web Forms palette and dropped on the application canvas (Figure 5.28).

Figure 5.28. The ASP.NET Mobile Application designer.

After they are compiled and established as the Startup Project, Mobile ASP.NET applications, unlike the Smart Device application, can be tested using either a normal Internet Explorer browser (see Figure 5.29) or by accessing the site using a wireless phone or a PDA SDK.

Figure 5.29. Running ASP.NET Mobile applications.

The source code for the Mobile ASP.NET application generated through the visual designer follows :

 
 <%@ Register TagPrefix="mobile"     Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <%@ Page language="c#" Codebehind="MobileWebForm1.aspx.cs"     Inherits="MobileWebApplication1.MobileWebForm1" AutoEventWireup="false" %> <HEAD>    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">    <meta name="CODE_LANGUAGE" content="C#">    <meta name="vs_targetSchema"        content="http://schemas.microsoft.com/Mobile/Page"> </HEAD> <body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">    <mobile:Form id="Form1" runat="server">       <mobile:Label id="Label1" runat="server">              Mobile Web Application       </mobile:Label>    </mobile:Form> </body> 


Microsoft.Net Kick Start
Microsoft .NET Kick Start
ISBN: 0672325748
EAN: 2147483647
Year: 2003
Pages: 195
Authors: Hitesh Seth

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net