HtmlControl.IAttributeAccessor.GetAttribute(String) 方法

定义

有关此成员的说明,请参阅 GetAttribute(String)For a description of this member, see GetAttribute(String).

 virtual System::String ^ System.Web.UI.IAttributeAccessor.GetAttribute(System::String ^ name) = System::Web::UI::IAttributeAccessor::GetAttribute;
string IAttributeAccessor.GetAttribute (string name);
abstract member System.Web.UI.IAttributeAccessor.GetAttribute : string -> string
override this.System.Web.UI.IAttributeAccessor.GetAttribute : string -> string
Function GetAttribute (name As String) As String Implements IAttributeAccessor.GetAttribute

参数

name
String

特性名称。The attribute name.

返回

元素中此特性 String 形式的值。The value of this attribute on the element, as a String value. 如果此元素中不存在指定的特性,则返回一个空字符串 ("")。If the specified attribute does not exist on this element, returns an empty string ("").

实现

注解

IAttributeAccessor.GetAttribute 方法调用 GetAttribute 方法。The IAttributeAccessor.GetAttribute method calls the GetAttribute method.

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 HtmlControl 实例被强制转换为 IAttributeAccessor 接口时使用。It can be used only when the HtmlControl instance is cast to an IAttributeAccessor interface.

适用于

另请参阅