Proprietà CanInitiateVoiceCall

Restituisce true se il dispositivo è in grado di inizializzare una chiamata vocale. Il valore predefinito è false.

public virtual bool CanInitiateVoiceCall {
   get
}

Esempio

Nell'esempio che segue viene illustrato come utilizzare la proprietà CanInitiateVoiceCall.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

   PhoneCall1.Text = "Police, Fire, Ambulance"
   PhoneCall1.PhoneNumber = "911"

   Dim currentCapabilities As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)

If currentCapabilities.CanInitiateVoiceCall Then
   PhoneCall1.AlternateFormat = "Call {0} at {1}"
Else

   PhoneCall1.AlternateFormat = " You can click this link " + "to navigate it's Web Site"
End If

End Sub

[C#]

public void Page_Load(Object sender, EventArgs e)
{
   MobileCapabilities currentCapabilities
      = (MobileCapabilities)Request.Browser;
   if (currentCapabilities.CanInitiateVoiceCall)
   {
     phoneCall1.AlternateFormat = "Call {0} at {1}";
   }
   else
   {
      phoneCall1.AlternateFormat = " You can click this link "
        + "to navigate it's Web Site";
   }
} 

Vedere anche

Si applica a: classe MobileCapabilities