-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: ravi varma
Message 1 in Discussion
Mobile Applications Design Concepts
The .NET Mobile Web SDK supplies three container objects: MobilePage, Form and Panel.
The MobilePage control is the primary container for the mobile application. A single
MobilePage can have one or more Form controls. A Form control can have zero are more
Panel controls. Panels are used to group mobile controls. Mobile Controls Shipped
With .NET Mobile Web SDK
Mobile controls can be grouped into three main groups. They are User Interface (UI)
controls, Validation Controls and Utility controls. The UI controls are things such as
Label controls that allow us to manipulate the UI. The validation controls allow us to
validate the user input such as RequiredFieldValidator control. These controls
validate the data entered by the user before the data gets submitted to the server.
The utility controls are items such as the Calendar control, which supports the
viewing a calendar with out writing any code.
The following tables show the controls shipped in the above categories. UI Controls
Control Name Description Command A Command control performs actions such as
submitting information. Form Form control is a container for one or more mobile
controls. Image Displays an image on the mobile device. Label Displays output text
on the mobile device. Link Creates a hyperlink in the mobile form. List Displays a
list of items on the mobile device. MobilePage Container control for all mobile
controls. TextBox Displays single line text box. Textview Displays multilane text
box. Validation Controls Control Name Description CompareValidator Compares two
mobile controls. CustomValidator Custom validator provides us to call our own
validation procedure from the control. RangeValidator Range validator validates the
data within a range. RegularExpressionValidator Validates the data against the
expression specified in the control. RequiredFieldValidator Verifies that the user
enter some data in these fields. ValidationSummary Displays a summary of all the
validation that occurred. Utility Controls Control Name Description Call Supports
calling a Telephone number. Calendar Displays a calendar for date picking
functionality. AdRotator Displays random advertisement.
Automatic pagination is one of the main advantages of the .NET Mobile Web SDK. The
.NET runtime will take care of the paging for the targeted device. The pagination is
handled differently for each different Mobile control. For example, for the List
control, the pagination is handled by the PageSize property of the control. This
property is set automatically based on the target device. When the paging takes place
at runtime the controls included in the panel control will stay together. A Simple
Example
Let�s write a simple application that displays a text box to accept your name and
displays the entered name in the next form.
<XMP><%@ Page Inherits="System.Mobile.UI.MobilePage" %> <%@ Register
TagPrefix="mobile" Namespace="System.Mobile.UI" %> language="VB" runat="server">
Sub Btn_OnClick(Src As Object, E As EventArgs) �Move to the next
mobile form ActiveForm = frm2 �redisplay the name.
EnteredName.Text = "Your name is: " & YourName.Text End Sub </Script> <mobile:Form
id="frm1" runat=server> <mobile:Label runat=server>Your Name:</mobile:Label>
<mobile:TextBox runat="server" id="YourName" /> <mobile:Command runat="server"
id="btn" OnClick="Btn_OnClick">Ok</mobile:Command> </mobile:Form> <mobile:Form
id="frm2" runat=server> <mobile:Label runat="server" id="EnteredName" />
</mobile:Form> </XMP>
In the above code, we built two mobile forms. The first form has the id of frm1 and
the next form has the id as frm2. By the way, the Mobile Form control doesn�t support
the name attribute. Instead, it supports the id attribute. That�s how the ASP.NET
runtime identifies the forms. In the first form, we�ve added a label control, text box
control and a command button control. When the command button is clicked, the
server-side VB sub routine (Btn_OnClick) will be called. Those who are familiar with
VB will feel right at home now. In the event handling VB sub routine, we�re moving to
the next form by setting the ActiveForm method to frm2. Then we�re accessing the label
control defined in the frm2 and setting the value submitted by the user.
Here is the screen shot of the above code in action simulated in the Phone.com and
Pocket IE simulators.
Here is the view of the code generated for the Phone.com simulator by ASP.NET.
As you can see, ASP.NET generated the WML code necessary to handle the text input from
the user and post it to the server. It also generated the WML output to display the
user-entered name in the next WML card Pros and Cons Of The .NET Mobile Web SDK
There are a few pros and cons of using the Mobile Web SDK. Pros No need to do
browser checks and deliver WML or HTML content based on the target device. Only
thing to learn is ASP.NET and .NET Mobile Controls. No need to learn WML.
Easy to use programming model and drag and drop application development with Visual
Studio.NET Server-Side event handling support. Automatic paging support.
Cons You are limited to Microsoft products and operating systems. When a
new version of WML or HTML is released, you�ll wait until Microsoft announces support
for the new version with its Mobile Web Controls. Supported Devices
The .NET framework is still in development (Beta 1). Currently .NET Mobile Web SDK has
been fully tested on following devices: Pocket PC with Microsoft Pocket
Internet Explorer version 4.5 Mitsubishi T250 phone Nokia 7110 phone Nokia
WAP Toolkit 2.0 Beta simulator for the Nokia 7110
The .NET Mobile Web SDK has undergone limited testing on the following devices:
Samsung Touchpoint phone Sony CMD-z5 phone Microsoft Mobile Explorer� v
2.01 simulator Phone.com UP.SDK 4.0 simulator with the generic skin Phone.com
UP.SDK 3.2 for WML simulator with Mitsubishi T250 skin
Many other devices are supported but have not yet been tested with the NET Mobile Web
SDK. You will notice that I've used an untested skin with the Phone.com WAP simulator
in this article.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]