| HTML Tutorials |
|
|
| XML Tutorials |
|
|
| Browser Scripting |
|
|
| Server Scripting |
|
|
| .NET (dotnet) |
|
|
| Multimedia |
|
|
| Web Building |
|
|
| Java Tutorials |
|
|
| Programming Langauges |
|
|
| Soft Skills |
|
|
|
|
Overview
|
|
To run your applications which are developed using the .NET Framework, the .NET Framework version 1.1 redistributable package includes everything that we need to accomplish the task.
With the help of ASP.NET mobile controls (formerly the Microsoft Mobile Internet Toolkit), and the support for Internet Protocol version 6, the .NET Framework version 1.1 provides improved scalability and performance, supported for mobile device development.
Note: You cannot install two different language versions of the .NET Framework on the same machine. Attempting to install a second language version of the .NET Framework will cause the following error to appear: "Setup cannot install Microsoft .NET Framework because another version of the product is already installed." If you are targeting a non-English platform or if you wish to view .NET Framework resources in a different language, you must download the appropriate language version of the .NET Framework language pack.
|
|
You want to create ASP.NET pages that are targeted for mobile devices.
|
|
In the mobile devices that have small screens, your Web application might be unbearable to navigate. Even though the ASP.NET can allow you to create some pretty sophisticated Web sites.
- vThe Smart Device Extensions include ASP.NET Mobile Web Forms to allow you to create specific Web Forms tailored to small devices.
Select the ASP.NET Mobile Web Application template from the New Project Wizard to create a new Mobile ASP.NET project.
You are placed in the Web Form designer for mobile Web application Once you create the project. The main difference that you'll notice right away between Mobile ASP.NET pages and regular ASP.NET pages is the inability to use GridLayout.
You will see a small window within the designer labeled Form1, which is where you place any necessary Mobile ASP.NET controls as soon as you open the designer.
|
<%@ Page language="c#" 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 id=Test Runat="Server">Hello, Mobile World</mobile:Label>
</mobile:Form>
|
|
|
The above shown example shows how to program with mobile controls. In this example, this program creates a mobile Web Forms page with a single form on it. That form contains a Label control with the string: "Hello, Mobile World".
|
|
Syntax Issues in ASP.Net mobile web forms
|
|
Syntax are defferent from what we use in ASP.NET, for example, <%=, is not valid in
ASP.NET mobile controls, and it should be replaced by data-binding mechanisms.
The following is an example of the use of data-binding expressions.
|
|
<%# binding expression code goes here %>
|
|
|
Data-binding expressions must be delimited by <%# and %>.
|
|
In the "Hello, Mobile World" program above:
|
|
Here we use Page directive to tell ASP to inherit (use) mobile page handling instead of regular page handling (like the one used for traditional browsers).
You can use any prefix you like in the Register directive which defines the prefix that will be used for mobile controls. We have used "mobile" in the above example.
The <mob:Form> element tells the server to create a mobile form control. The <mob:Label> element tells the server to create a mobile label control abd with the text "Hello, Mobile World" to this label control.
It will produce the following output for a Pocket PC when the ASP.NET page executes the above program:
|
<html>
<body>
<form id="ctrl1" name="ctrl1" method="post"
action="example.aspx">
<div>Hello, Mobile World</div>
</form>
</body>
</html>
|
|
|
.NET Mobile will generate WML code for WAP enabled cell phones and HTML code for devices like the Pocket PC. By detecting the browser, .NET Mobile will output correct content, providing developers with a powerful tool to develop single applications that will serve many different mobile devices.
|
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
.NET Mobile examples,cover letter examples,resume writing examples,mobile ring tones,cell phone mobile,pay as you go mobile.
|
|
| HTML Quizes |
|
|
| XML Quizes |
|
|
| Browser Scripting Quizes |
|
|
| Server Scripting Quizes |
|
|
| .NET (dotnet) Quizes |
|
|
| Multimedia Quizes |
|
|
| Web Building Quizes |
|
|
| Java Quizes |
|
|
| Programming Langauges Quizes |
|
|
| Soft Skills Quizes |
|
|
|