ASP.NET Mobile PhoneCall Control[转]
Definition and Usage
定义和用法
The PhoneCall control is used to specify a phone number to call.
PhoneCall控件的作用是:指定需要呼叫的电话号码。
For devices that can make a phone call, this control is displayed as an element that when selected, it makes a phone call. On other devices, the phone number is displayed as text or as a hyperlink.
对于能够拨通电话的设备来说,该空间是以一个元素的形式显示的;当该元素被选择时,它将拨通相对应的电话。对于其它设备来说,电话号码是以文本或超链接的形式显示的。
Properties
属性
Property 属性 |
Value 值 |
Description 描述 |
---|---|---|
Alignment | left center right |
Optional. How to align the control 可选参数。指定控件的排列方式 |
AlternateFormat | text | Optional. The formatting string for the text value of the PhoneNumber property. If you use the value "{0}" it will display the text from the "Text" property. If you use the value "{1}" it will display the text from the "PhoneNumber" attribute. If you use the value "{0} is {1}" it will display the text from the Text property first, an "is", and then the text from the PhoneNumber property. Default value is {0} {1}. 可选参数。指定PhoneNumber属性文本值的格式化字符串。如果你使用值 "{0}",它将显示 “Text” 属性中的文本;如果你使用值 "{1}",它将显示 "PhoneNumber" 属性中的文本;如果你使用值"{0} is {1}",那么它将先显示“Text” 属性中的文本,然后再显示 "PhoneNumber" 属性中的文本。默认值是“ {0} {1}” Note: This property is used only with devices that are unable to make a phone call! |
AlternateURL | URL | Optional. If you specify a URL in this property, the value in the AlternateFormat property will be displayed as a hyperlink. If you click on the hyperlink, the control browses to the specified URL. 可选参数。如果你在该属性中指定了URL。那么AlternateFormat 属性中的值将以超链接的形式显示出来。如果你点击了这个超链接,那么该控件将显示指定的URL Note: This property is used only with devices that are unable to make a phone call! |
BackColor | rgb(x,x,x) #xxxxxx colorname |
Optional. A background color for the control 可选参数。指定控件的背景颜色 |
ForeColor | rgb(x,x,x) #xxxxxx colorname |
Optional. A foreground color for the control 可选参数。指定控件的前景色 |
Font-Bold | false true |
Optional. Specifies whether or not the text in the control should be bold 可选参数。指定控件中的文本字体是否以粗体显示 |
Font-Italic | false true |
Optional. Specifies whether or not the text in the control should be italic 可选参数。指定控件中的文本字体是否以斜体显示 |
Font-Name | fontname | Optional. Specifies the font name of the text in the control 可选参数。指定空间中的文本字体名称 |
Font-Size | normal small large |
Optional. Specifies the font size of the text in the control 可选参数。指定空间中的文本字体尺寸 |
id | unique_name | Optional. A unique id for the control 可选参数。为空间指定一个独立的id |
PhoneNumber | phone_number | Optional. Specifies a phone number 可选参数。指定一个电话号码 |
runat | "server" | Required. Specifies that the control is a server control 必要参数。指定该控件为服务器控件 |
SoftKeylabel | softkeylabel | Optional. 可选参数 |
StyleReference | name_of_style_element | Optional. Specifies a reference to a style to be applied to the control 可选参数。指定一个应用于控件的样式参数 |
Text | text | Optional. Specifies the text to be displayed for devices that are able to make phone calls. Default value is Phone Number 可选参数。指定在可以拨打电话的设备中显示的文本内容。默认值是“电话号码” |
Wrapping | wrap nowrap |
Optional. Specifies whether or not the text in the control should wrap 可选参数。 |
Example 1
案例1
The following example contains one form in an .aspx file. The first form contains a PhoneCall control that will display the text "Tove's number" and dial the number (555) 555-5555 when the user selects the text:
下面这个案例包含了 .aspx 文件中的两张表单。第一张表单中包含了一个PhoneCall控件,它显示了“Tove's number” 文本内容。当用户选择该文本时,它将拨打电话(555)555-5555:
<%@ Page <Mobile:Form runat="server"> |