Adds attributes from the System.Web.UI.AttributeCollection class to the System.Web.UI.HtmlTextWriter object that is responsible for rendering the attributes as markup.
- writer
- An System.Web.UI.HtmlTextWriter instance that writes the attribute to the opening tag of an ASP.NET server control.
This method copies all the server control's attributes to an System.Web.UI.HtmlTextWriter object so that they can be rendered by the next call to the HtmlTextWriter.RenderBeginTag(string) method.
For controls that are contained in other controls such as System.Web.UI.WebControls.Calendar and System.Web.UI.WebControls.CheckBoxList, you can potentially improve performance by rendering the contained controls directly. Rendering directly can be faster than rendering through the container control because container controls require that you copy all the child control attributes to the container control and render them after they are copied.