IAttributeAccessor Interface


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Defines methods used by ASP.NET server controls to provide programmatic access to any attribute declared in the opening tag of a server control.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

type IAttributeAccessor = interface end


When implemented by a class, retrieves the specified attribute property from the server control.

System_CAPS_pubmethodSetAttribute(String, String)

When implemented by a class, designates an attribute and its value to assign to the ASP.NET server control.

If you author a custom server control that inherits from the WebControl, HtmlControl, or ListItem class, the .NET Framework automatically provides programmatic access to attributes because each of these classes implement the IAttributeAccessor interface.

If you author a custom server control that does not inherit from one of these classes and plan to allow programmatic access to attributes that do not correspond with the control's strongly typed properties, be sure to implement the IAttributeAccessor interface.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top