This documentation is archived and is not being maintained.

WebServiceBindingAttribute.Name Property

Gets or sets the name of the binding.

Namespace: System.Web.Services
Assembly: System.Web.Services (in

public string Name { get; set; }
/** @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 of the binding. The default is the name of the XML Web service with "Soap" appended.

The following example specifies a binding named LocalBinding that is defined in the BindingSample XML Web service.

// Binding is defined in this XML Web service and uses the default namespace.
 [ WebServiceBinding(Name="LocalBinding")]
 public class BindingSample  {

      [ SoapDocumentMethod(Binding="LocalBinding")]
      [ WebMethod() ]
      public string LocalBindingMethod() {
               return "Member of binding defined in this XML Web service and member of the default namespace";


Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, 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

.NET Compact Framework

Supported in: 2.0, 1.0