Name

IAttributeAccessor

Synopsis

This interface defines a GetAttribute() and a SetAttribute() method that provide programmatic access to the style attributes defined in the opening tag for a server control. This interface is implemented by System.Web.UI.WebControls.WebControl and System.Web.UI.HtmlControls.HtmlControl, both of which also provide an AttributeCollection through the Style property. Although you can use this interface if you create a custom control that derives from Control, it is easier to just inherit directly from System.Web.UI.WebControls.WebControl.

Public Interface IAttributeAccessor
                  ' Public Instance Methods
   Public Function GetAttribute(
        ByVal key As String) As String  
   Public Sub SetAttribute(ByVal key As String, 
        ByVal value As String) 
End Interface

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.