WebServiceAttribute.Name Property

Gets or sets the name of the XML Web service.

Namespace: System.Web.Services
Assembly: System.Web.Services (in system.web.services.dll)

public:
property String^ Name {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_Name ()

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

public function get Name () : String

public function set Name (value : String)

Not applicable.

Property Value

The name for the XML Web service. Default value is the name of the class implementing the XML Web service.

The Service Description is generated when a user navigates to the URL for the XML Web service and supplies a query string of ?WSDL. Within the Service Description, the Name property identifies the local part of the XML qualified name for the XML Web service. The Name property is also used to display the name of the XML Web service on the Service help page. The Service help page is displayed when a prospective consumer navigates to the.asmx page for the XML Web service without specifying an XML Web service method name and its parameters.

An XML qualified name is used to disambiguate elements with the same name with an XML document. An XML qualified name consists of the following two parts separated by a colon: namespace or a prefix associated with a namespace and local part. The namespace consists of a URI reference and for the purposes of the Service Description, is the value of the Namespace property. In general, a prefix, which acts like an alias to an URI, is associated with the namespace, so that all subsequent XML qualified names using the namespace can use the shortened prefix. The local part is a string beginning with a letter or underscore containing no spaces. Therefore, the XML qualified name identifying a XML Web service in the Service Description is in the following format:

Namespace : Name

For more information on XML qualified names, see http://www.w3.org/TR/REC-xml-names/.

The following example sets Name of the XML Web service to MyName.

No code example is currently available or this language may not be supported.

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, 1.0

Community Additions

ADD
Show: