PhoneCall Class
Provides control capability to render a command that the user can select to dial the specified phone number.
Assembly: System.Web.Mobile (in System.Web.Mobile.dll)
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)] [AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)] public ref class PhoneCall : public TextControl, IPostBackEventHandler
<mobile:PhoneCall />
For devices with telephony capability, such as a cell phone, the PhoneCall control renders a command that the user can select to dial the specified phone number.
On devices without telephony capability, the PhoneCall control renders alternate text, possibly including the phone number or a link; it is not treated as a command that has dialing capability.
The following code example demonstrates how to add several phone numbers to a Panel on your page. One PhoneCall control has an AlternateUrl and the phone number appears as a link on devices that cannot make a phone call.
Note: |
|---|
The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see ASP.NET Web Page Syntax Overview. |
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
System.Web.UI::Control
System.Web.UI.MobileControls::MobileControl
System.Web.UI.MobileControls::TextControl
System.Web.UI.MobileControls::PhoneCall
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: