Mobile .NET event
Mobile Controls Exposes Device Independent Programmable events.
Event programming
The mobile control has an object model that can be programmed to attributes, methods, and events.
For complete information, please refer to the "Reference section".
Submit text
This page has two forms:
<% @ PAGE
Inherits =
"System.Web.ui.MobileControls.MobilePage"%>
<% @ Register
Tagprefix = "mobile"
Namespace = "system.web.ui.mobileControls"
AskMBLY = "System.Web.Mobile"%>
DIM AGE
Sub AgeClick (Sender As Object, E AS Eventargs)
AGE = text1.text
Activeform = Form2
End Sub
SUB FORM2_ACTIVATE (Sender As Object, E AS Eventargs)
Message.text = "you are" & agn "Years OLD"
End Sub
script>
<
MOBILE
: Form id = "form1" runat = "server">
<
MOBILE
: Label Runat = "Server"> AGE? Mobile: Label>
<
MOBILE
: TextBox runat = "server" id = "text1" />
<
MOBILE
: Command runat = "server" onclick = "ageclick" text = "submit" />
MOBILE
: Form>
<
MOBILE
: Form id = "form2" runat = "server" onactivate = "form2_activate">
<
MOBILE
: Label runat = "server" id = "message" />
MOBILE
: Form>
When a page has two forms, the first form is always an open default form.
The first form has a content is the label control of the AGE, an input control is used to enter age (AGE) and a submit button.
The second page is activated by the submission button of the first page (the translator Note: The second Form is activated by the first Form commit button, not the original information.), And display the corresponding information.
When the app is running on the mobile device, these two pages look like the following:
Form1:
AGE?
Form 2
You are 11 years old
Move .NET input
Input Controls Are Used To Collect Input from the Mobile User.
Enter control
There are a lot of mobile controls support user input.
In Demo in the previous section, the maximum input control may be the TextBox control. Textbox is a simple input, such as name, quantity, and identifier and keyword. If you enter a large number of texts, the TextView control may be a better choice. The TEXTVIEW control allows for long multi-line inputs like you send a message to others with MSN.
Digital input
We can receive only the digital input information by setting the TEXTBOX attribute Numeric to receive only the number of input information.
Note: This feature is typically working on a mobile phone that is changed from the text to the digital input mode. However, this behavior is usually not supported on an HTML browser.
Password input
We can set the Password property of the TextBox control to True or False to specify the TextBox handling password field.
The password field will replace the original text by * (asterisk) to hide the input information.
List control
The TextBox and TextView controls are ideal for input information, but sometimes you want users to select prior defined values from existing lists.
SelectionList control supports drop-down list, check the box and radio button. This part of the content will be introduced in other chapters.
List control supports menu and list options, the list control will be introduced in other chapters.
User interface control
The user control is a set of controls that display the user interface.
Name
FUNCTION
Command
Performs an action
FORM
Defines a Container for Mobile Controls
Image
Defines an image
Label
Defines a Text
LINK
Defines a hyperlink
List
Defines a list
MobilePage
Defines a Container for Mobile Controls
ObjectList
Defines a List of data Objects
Panel
Defines a container for other controls
SelectionList
Defines a List to select from
Stylesheet
Defines Styles to Be Applied To Other Controls
Textbox
Defines a Single Line INPUT BOX
TextView
Defines a Multi-Line Input Box
Need to know more control references, including properties, events, and more examples, please refer to
"Mobile Reference"
page.