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

WAP之家技术文章WAP教程网站教程ASP.NET Mobile Link Control

ASP.NET Mobile Link Control
作者:佚名  来源:本站整理  发布时间:2008-3-14 20:44:02

Definition and Usage
定义和用法

The Link control is used to create a hyperlink on a mobile device.
链接控件的作用是:在一个移动设备上创建一个超链接。


Properties
属性

Property
属性
Value
Description
描述
Alignment left
center
right
Optional. How to align the Link control
可选参数。指定链接控件的对齐方式
BackColor rgb(x,x,x)
#xxxxxx
colorname
Optional. A background color for the link
可选参数。指定链接的背景颜色
ForeColor rgb(x,x,x)
#xxxxxx
colorname
Optional. A foreground color for the link
可选参数。指定链接的前景颜色
Font-Bold false
true
Optional. Specifies whether or not the text in the link should be bold
可选参数。指定链接文本是否以粗体显示
Font-Italic false
true
Optional. Specifies whether or not the text in the link should be italic
可选参数。指定链接字体是否以斜体显示
Font-Name fontname Optional. Specifies the font name of the text in the link
可选参数。指定链接文本的字体名称
Font-Size normal
small
large
Optional. Specifies the font size of the text in the link
可选参数。指定链接文本的字体大小
id unique_name Optional. A unique id for the control
可选参数。为控件指定一个独立的id
NavigateUrl URL
#form_id
Optional. The URL of the link. If the value of this property begins with a #, it means that the link should navigate to another form on the current MobilePage control
可选参数。指定链接的URL。如果该属性值以“a #” 为起始,这意味着该链接将跳转到当前移动页面控件的另外一张表单处
runat "server" Required. Specifies that the control is a server control
必要参数。指定某控件为服务器控件
SoftkeyLabel text Optional. Sets or returns the text displayed for a soft key when the NavigateUrl property is defined
可选参数。当NavigateUrl属性被定义时,设置或返回一个软键[soft key]的文本显示
StyleReference name_of_style_element Optional. Specifies a reference to a style to be applied to the control
可选参数。指定一个应用于控件的样式参数
Text text Optional. The text to display in the link
可选参数。指定链接所对应的文本
Wrapping wrap
nowrap
Optional. Specifies whether or not the text in the link should wrap
可选参数。指定链接中的文本是否可以被嵌套

Example 1
案例1

The following example contains one form in an .aspx file. The Link control creates a hyperlink to W3Schools:
下面这个案例包含一个位于.aspx文件中的表单控件,该链接控件将创建一个到“ W3POP” 的超链接:

<%@ Page
Inherits="System.Web.UI.MobileControls.MobilePage"%>
<%@ Register TagPrefix="Mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<Mobile:Form runat="server">
<Mobile:Link runat="server"
NavigateURL="http://www.w3pop.com">Go to W3POP!
</Mobile:Link>
</Mobile:Form>

Example 2
案例2

The following example contains two forms in an .aspx file. The Link control lets the user navigate between the two mobile forms:
下面这个案例包含了位于 .aspx文件中的两个表单。该链接控件可以使用户在两张移动表单中自由切换:

<%@ 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>

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

用户名: 查看更多评论

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

内 容:

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