
780
|
Chapter 40: The System.Web.UI.MobileControls Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
PhoneCall
System.Web.UI.MobileControls (system.web.mobile.dll)
.NET 1.1, disposable
class
The PhoneCall control is used on devices that have telephone ability. On these devices, it
will render as a command that the user can select to dial the specified phone number.
You can set the Text property to configure the text that will appear, and you must set
the PhoneNumber property to specify the nunber that will be dialed when the control is
selected. This property accepts a string that can use multiple phone number formats,
including brackes, dashes, and periods. A phone number can start with the + sign and
an optional country or region code. Examples of valid numbers include 800.522.2920,
+1 (425) 885-8080, and +91335303197. i-Mode phones impose their own rules on
valid phone numbers, which are described in detail the MSDN reference.
On a device that does not provide telephony capability, the PhoneCall control can render
as a link to a URL. You can set this URL using the AlternateUrl property. In addition, you
can configure the text that will be displayed using the AlternateFormat string. By default,
this property is “{0} {1}”. This means that on non-telephony devices, the PhoneCall will
display the Text property with the PhoneNumber ...