WebControl.IAttributeAccessor.SetAttribute(String, String) WebControl.IAttributeAccessor.SetAttribute(String, String) WebControl.IAttributeAccessor.SetAttribute(String, String) Method

定义

将 Web 控件的特性设置为指定的名称和值。Sets an attribute of the Web control to the specified name and value.

 virtual void System.Web.UI.IAttributeAccessor.SetAttribute(System::String ^ name, System::String ^ value) = System::Web::UI::IAttributeAccessor::SetAttribute;
void IAttributeAccessor.SetAttribute (string name, string value);
Sub SetAttribute (name As String, value As String) Implements IAttributeAccessor.SetAttribute

参数

name
String String String

特性的名称/值对的名称组件。The name component of the attribute's name/value pair.

value
String String String

特性的名称/值对的值组件。The value component of the attribute's name/value pair.

实现

注解

IAttributeAccessor.SetAttribute方法是显式接口成员实现。The IAttributeAccessor.SetAttribute method is an explicit interface member implementation. 它只能在WebControl类的实例被强制转换IAttributeAccessor为接口时使用。It can be used only when the instance of the WebControl class is cast to an IAttributeAccessor interface.

适用于

另请参阅