Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

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 property concatenated to it (with a space separating them). You can alter the AlternateFormat property to insert your own text.

public class PhoneCall : TextControl, System.Web.UI.IPostBackEventHandler {
// Public Constructors
   public PhoneCall( );
// Public Instance Properties
   public string AlternateFormat{set; get; }
   public string AlternateUrl{set; get; }
   public string PhoneNumber{set; get; }
   public string SoftkeyLabel{set; get; }
// Public Instance Methods
   public override void AddLinkedForms(System.Collections.IList linkedForms);   // overrides MobileControl
                  // Protected Instance Methods
   protected override void OnPreRender(EventArgs e);            // overrides MobileControl



You are currently reading a PREVIEW of this book.


Get instant access to over $1 million worth of books and videos.


Start a Free 10-Day Trial

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint