WebControl.IAttributeAccessor.SetAttribute(String, String) 方法

定義

將 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);
abstract member System.Web.UI.IAttributeAccessor.SetAttribute : string * string -> unit
override this.System.Web.UI.IAttributeAccessor.SetAttribute : string * string -> unit
Sub SetAttribute (name As String, value As String) Implements IAttributeAccessor.SetAttribute

參數

name
String

屬性名稱/值組的名稱元件。The name component of the attribute's name/value pair.

value
String

屬性名稱/值組的值元件。The value component of the attribute's name/value pair.

實作

備註

IAttributeAccessor.SetAttribute方法是明確的介面成員執行。The IAttributeAccessor.SetAttribute method is an explicit interface member implementation. 只有當類別的實例 WebControl 轉換成介面時,才能使用它 IAttributeAccessorIt can be used only when the instance of the WebControl class is cast to an IAttributeAccessor interface.

適用於

另請參閱