WAP之家:为您提供最全最新的WAP技术,CP.SP.3G等行业资讯。 WAP之家交流论坛全新开放 点击进入>>
WAP资讯 | 3G动态 | SP动态 | 运营商动态 | 内容商动态 | 制造商动态 | 论坛讨论>> 每次自动访问
WAP技术 | WAP源码 | 手机编程 | 手机源码 | 无线技术 | J2ME技术 | 手机软件 添加到收藏夹
IVR技术 | SP资料 | SMS MMS技术 | 商业方案 | IVR下载 | 书籍教程 | 工具软件 语言:繁體中文

WAP之家技术文章WAP教程网站教程.NET Mobile窗口

.NET Mobile窗口
作者:佚名  来源:本站整理  发布时间:2008-3-14 15:15:09

.NET Mobile Forms are specialized web forms designed to work on different mobile devices.
.NET Mobile窗口是用于在不同的Mobile装置工作的特殊的网页窗口。


Mobile Pages
Mobile页面

A mobile page is much the same as an ordinary .NET web page. It is a text file with an aspx extension, and it can contain a variety of web controls.
Mobile页面很像普通的.NET网页页面,它是一份扩展名为“aspx”的文本文件,而且它能包含很多种网页控件。

The difference is the page directive that identifies the page as a mobile page, and the controls used on the page, which are mobile controls.
不同之处在于页面指示把页面识别为Mobile页面,以及页面使用的控件是Mobile控件

The mobile controls can be programmed device-independently, and the page will produce an output that suits the device that access it.
Mobile控件可以设计为使部件独立的,并且页面会产生与访问页面的部件相配的输出文件。


Mobile Forms
Mobile窗口

Each mobile page must have at least one mobile form, and each mobile form can have a number of mobile controls.
每页Mobile页面必须至少有一个Mobile窗口,每个Mobile窗口可以有大量的Mobile控件

Note that mobile pages can have multiple mobile forms. This is due to the nature of mobile devices. Mobile devices have small screens and it is very normal to navigate between screens with a simple link.
要注意Mobile页面可以有多重的Mobile窗口。这是由Mobile装置的性质决定的。Mobile装置的窗口很小,所以通过简易的链接在页面之间自由穿行是很普遍的。


Automatic Paging
自动调度页面

.NET Mobile supports automatic paging for different mobile devices.
.NET Mobile支持对不同Mobile装置的自动页面调度。

The paging is handled differently for each control. For example when paging takes place the controls included in a panel control will stay together.
对于页面调度(paging)的方法对于不同空间来说是有区别的。举例来说,当进行页面调度时,一块面板里的所有控件都会聚在一起。


Displaying Text
显示文本

This mobile page uses a TextView control to display a large amount of text:
这页Mobile页面使用了TextView(文本浏览)控件来显示大量文本。

<%@ Page
Inherits=
"System.Web.UI.MobileControls.MobilePage"%>
<%@ Register
TagPrefix="Mobile"

Namespace="System.Web.UI.MobileControls"
Assembly="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 a mobile device, the navigation and display functions of the page will be compiled differently for different devices with different display characteristics.
当这页在Mobile装置上显示时,对于有不同显示特征的不同部件,页面的操纵和显示函数也会被编译得不同。

When the text is displayed on a pocket PC with a small display, the user will be able to scroll the text with a scroll bar, but on a cell phone the text will be displayed over several screens with proper navigation tools added.
当文本在小型显示屏的pocket PC上显示时,用户可以使用滚动条滚动文本,但在手机上,通过添加适当的操作工具,文本文件将会在几个不同的屏幕上显示。

Note that all mobile controls must have the runat attribute set to "server", in order to secure proper rendering of the page for different devices.
要注意所有的Mobile控件的runat属性必须设置为"server",这样可以确保合理地显示不同的部件页面。


Single Forms
单一窗口
 

This mobile page has one form:
这页Mobile页面有一个窗口

<%@ Page
Inherits=
"System.Web.UI.MobileControls.MobilePage"%>
<%@ Register
TagPrefix="Mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<Mobile:Form runat="server">
<Mobile:Label runat="server">Hello W3POP
</Mobile:Label>
</Mobile:Form>

 


Multiple Forms
多窗口

This mobile page has two forms:
这页Mobile页面有两个窗口

<%@ Page
Inherits=
"System.Web.UI.MobileControls.MobilePage"%>
<%@ Register
TagPrefix="Mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<Mobile:Form id="f1" runat="server">

<Mobile:Label runat="server">Hello W3POP
</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>

 


Links
链接

Note the <Mobile:Link> element in the example above. The link control lets the user navigate between the two mobile forms.
注意上述例子里的<Mobile:Link>元素。Link(链接)控件使用户可以在两个Mobile窗口间操作。

[] [返回上一页] [打 印]
文章评论

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码