I've created a web control and I want to pass the element attributes through during the render phase. I would prefer use writer.RenderBeginTag() and RenderEndTag() but this is the only way I can seem to integrate the attributes successfully:
public override void RenderBeginTag(HtmlTextWriter writer)
{
writer.Write("<");
writer.Write(this.Tag);
this.Attributes.Render(writer);
writer.Write(">");
}
Is there another way to do this without looping through the Attributes collection?