AttributeCollection.Render Method (HtmlTextWriter)
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.
Available since 1.1