AttributeCollection::Render Method
Writes the collection of attributes to the specified HtmlTextWriter output stream for the control to which the collection belongs.
Assembly: System.Web (in System.Web.dll)
Parameters
- writer
- Type: System.Web.UI::HtmlTextWriter
An HtmlTextWriter instance that writes the attribute collection to the current output stream.
This section contains two code examples. The first code example shows how to inherit from the WebControl class to create a custom control named AttribRender that overrides the Render method. The second code example shows how to use the custom control in an ASP.NET Web page.
The following example shows how to create a custom control named AttribRender that overrides the Render method of the WebControl class without calling the Render method of the base class. Instead, AttribRender invokes the Render method.
The following example shows how to use the AttribRender custom control in a Web page. It assumes that the code file for the custom control is in the App_Code folder for the application.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.