How to Create Mobile Web Application in ASP.Net 2.0
Author: DevASP
Download Source Code : 327_CreatingMobileApp.zip
In this sample application I will try to explain you how you can create a mobile web application in Visual Studio 2005 (VS2005). Here I will discuss three of its controls.
Visual Studio provides many powerful and user friendly tools for creating Mobile Web Application. Creating Mobile Web application is as easy and simple as creating a simple web application. Different controls are also available that helps the developers in creating and managing there applications.
To create a mobile web application in ASP.Net 2.0, select new website option from file menu and give name to your project. After creating a website, select Add Item option by right clicking on your project from the solution explorer. When you select the Add Item option a dialog box will be displayed. Select Mobile Web Form from the dialog box and add the following code in your MobileWF.aspx:
You can also add the style sheet in your application by draging a droping the Style Sheet Mobile control from the toolbar:
In above code notice one thing that is you will see “mobile” prefix before each control and this prefix will help you in differentiating between the simple web application and mobile web application. Now double click on the form or press F7 to view the MobileWF.aspx.vb file and add the following code:
Notice I have created a global database connection object and one thing more don’t forget to import System.Data and System.Data.SqlClient namespaces. On the cmdShowRecord_Click event add the following code: