Main Page

  Previous Section Next Section

PhoneCall.NET 1.1, disposable

System.Web.UI.MobileControls (system.web.mobile.dll)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 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


System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) MobileControl(System.Web.UI.IAttributeAccessor) TextControl PhoneCall(System.Web.UI.IPostBackEventHandler)

Returned By

System.Web.UI.MobileControls.Adapters.HtmlPhoneCallAdapter.Control, System.Web.UI.MobileControls.Adapters.WmlPhoneCallAdapter.Control

      Previous Section Next Section