How to: Add and Configure a PhoneCall Control

A PhoneCall control enables applications to initiate telephone calls if the user's mobile device supports that capability. If the device cannot place phone calls, the PhoneCall control displays the phone number as text. If you specify a URL, it presents the text as a hyperlink.

To add a PhoneCall control to an ASP.NET mobile Web Forms page

  1. Drag a PhoneCall control from theMobile Web Forms tab of the Toolbox onto a Form or Panel control, or inside a control's template on an ASP.NET mobile Web page. You can also drag it onto a mobile user control page.

  2. Set the Text property to the string that the PhoneCall control displays to the user.

  3. Set the PhoneNumber property to the phone number that the device calls when the user activates the control.

  4. Optionally set the AlternateUrl property to the URL of the page that the application will navigate to when running on devices that cannot originate phone calls. Do this in one of the following ways:

    • Type the URL into the AlternateUrl property.

    • In the Properties window, click the arrow next to the AlternateUrl property. From the drop-down menu, select the name of one of the forms from the drop-down menu.

    • In the Properties window, click the arrow next to the AlternateUrl property. From the drop-down menu, select a URL by clicking Select URL. The Select URL dialog box appears. Browse to the location that you want to link to, and then click OK.

  5. Set the AlternateFormat property to determine how to format the phone number for display on devices that do not originate phone calls. The default format string is {0} {1}, which evaluates to the contents of the Text and PhoneNumber properties, respectively, separated by a space. You can type additional text, such as Call {0} now at {1}.

Community Additions

Show: