PhoneCall.PhoneNumber Property

Gets or sets a string that represents a phone number.

Namespace: System.Web.UI.MobileControls
Assembly: System.Web.Mobile (in system.web.mobile.dll)

[BindableAttribute(true)] 
public:
property String^ PhoneNumber {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_PhoneNumber ()

/** @property */
public void set_PhoneNumber (String value)

public function get PhoneNumber () : String

public function set PhoneNumber (value : String)

Not applicable.

Property Value

A string that represents a phone number.

Exception typeCondition

ArgumentException

the format of the number is invalid.

The PhoneNumber property is required on PhoneCall controls. The PhoneNumber property accepts strings in a variety of formats. The format for the following types of numbers is described by using the Backus-Naur Format (BNF syntax is a way to describe the syntax of file formats):

phone_number ::= international_number | national_number | short_number

international_number ::= "+" country_code national_number

short_number ::= "#" national_number

country_code ::= (decoration_character | digit)* digit (decoration_character 
       | digit)*

national_number ::= (decoration_character | digit)+

digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

decoration_character ::= "(" | ")" | "." | "-" | {space}

A phone number can consist of an optional country or region code, prefixed with a + sign, followed by any sequence of numbers that makes up the phone number. The characters marked as decoration_character can appear anywhere in the phone number and are ignored.

For i-Mode phones, the following rules currently apply when specifying a phone number:

  • The string must begin with "0" or "#".

  • If the string begins with "0", the numbers are more than nine digits.

  • If the string begins with "#", the numbers are more than three digits.

  • The numbers can contain "(", ")" and "-" in the string.

  • The string must be fewer than 24 characters.

The following list shows some examples of valid phone numbers:

  • 800.522.2920

  • +1 (425) 885-8080

  • +91335303197

  • 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.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1

Community Additions

ADD
Show: