WebServiceBindingAttribute.Name-Eigenschaft
Ruft den Namen der Bindung ab oder legt diesen fest.
Namespace: System.Web.Services
Assembly: System.Web.Services (in system.web.services.dll)
Syntax
'Declaration
Public Property Name As String
'Usage
Dim instance As WebServiceBindingAttribute
Dim value As String
value = instance.Name
instance.Name = value
public string Name { get; set; }
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)
Eigenschaftenwert
Der Name der Bindung. Als Standardname wird der Name des XML-Webdiensts verwendet, an den "Soap" angehängt wird.
Beispiel
Im folgenden Beispiel wird eine im BindingSample
-XML-Webdienst definierte Bindung mit dem Namen LocalBinding
angegeben.
' Binding is defined in this XML Web service and uses the default namespace.
<WebServiceBinding(Name := "LocalBinding")> _
Public Class BindingSample
<SoapDocumentMethod(Binding := "LocalBinding"), WebMethod()> _
Public Function LocalBindingMethod() As String
Return "Member of binding defined in this XML Web service and member of the default namespace"
End Function 'LocalBindingMethod
End Class
// 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";
}
}
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0, 1.0
Siehe auch
Referenz
WebServiceBindingAttribute-Klasse
WebServiceBindingAttribute-Member
System.Web.Services-Namespace