Mobile device web application development ---- (form)

zhaozj2021-02-16  46

Mobile .NET form

Moving the .NET form is a special web form designed to work in different mobile devices.

Mobile page

The mobile page and the original .NET web page are very similar. It is an ASPX extended text file and has the diversity of web controls (AND IT CAN Contain A Variety of Web Controls).

The difference between the two is the mobile page using the mobile page tag identification page, and the mobile control is used on the page.

The mobile control programming is devices dependent, and the page will generate a suitable output for the access device. (Translator Note: Different controls are different for different mobile devices.)

Mobile form

Each mobile page has a minimum of a mobile form, and each mobile form can have a certain number of mobile controls.

Note: The mobile page can have multiple mobile forms. This is because the actual situation of mobile devices. The mobile device has a small screen so that the screen is very normal through a simple link.

Automatic paging

Move .NET supports the function of automatically paging on different mobile devices.

The paging of each control is different, for example, the control.

Text

This mobile page displays a large text (a large amont of text) using the TextView control.

<% @ PAGE

Inherits =

"System.Web.ui.MobileControls.MobilePage"%>

<% @ Register

Tagprefix = "mobile"

Namespace = "system.web.ui.mobileControls"

AskMBLY = "System.Web.Mobile"%>

<

MOBILE

: Form runat = "server">

<

MOBILE

: TextView Runat = "Server">

This is a very long text to demonstrate

How text can be displayed over several screens.

This is a very long text to demonstrate

How text can be displayed over several screens.

This is a very long text to demonstrate

How text can be displayed over several screens.

This is a very long text to demonstrate

How text can be displayed over several screens.

MOBILE

: TextView>

MOBILE

: Form>

When this page is displayed on the mobile device, the navigation and display function of the page will be compiled into different displays in different devices.

When this text shows the Pocket PC of a small display screen, the user can scroll through the scroll bar, but this text will appear on a few screens that add the appropriate navigation tool on the phone.

Note: In order to be reliably rendered to different devices, all mobile controls must set the RUNAT attribute to Server (Translator Note: Like the standard ASP.NET page)

Single form

This mobile page contains a form:

<% @ PAGE

Inherits =

"System.Web.ui.MobileControls.MobilePage"%> <% @ register

Tagprefix = "mobile"

Namespace = "system.web.ui.mobileControls"

AskMBLY = "System.Web.Mobile"%>

<

Mobile

: Form runat = "server">

<

Mobile

: Label Runat = "Server"> Hello W3Schools

Mobile

: Label>

Mobile

: Form>

Multiple forms

This mobile page includes two forms:

<% @ PAGE

Inherits =

"System.Web.ui.MobileControls.MobilePage"%>

<% @ Register

Tagprefix = "mobile"

Namespace = "system.web.ui.mobileControls"

AskMBLY = "System.Web.Mobile"%>

<

Mobile

: Form id = "f1" runat = "server">

<

Mobile

: Label Runat = "Server"> Hello W3Schools

Mobile

: Label>

<

Mobile

: Link runat = "server" navigateURL = "# f2"> 2

Mobile

: LINK>

Mobile

: Form>

<

Mobile

: Form id = "f2" runat = "server">

<

MOBILE

: Label runat = "server"> Hello Again

MOBILE

: Label>

<

MOBILE

: Link runat = "server" navigateURL = "# f1"> 1

MOBILE

: LINK>

MOBILE

: Form>

hyperlink

Note: Examples above

label. This connection control allows the user to navigate between two mobile forms.

转载请注明原文地址:https://www.9cbs.com/read-23919.html

New Post(0)