This project is read-only.

LabelContainer Attribute

The label container attribute is used when you want to override the default wrapper that gets generated for a label.

usage
The following code will override the default wrapper with a div that contains the class "another_class".
[LabelContainer(typeof(DivTagBuilder))]
public string Textbox{ get; set; }

public class DivTagBuilder: TagBuilder
{
     public DivTagBuilder() : base( "div" )
     {
            this.AddCssClass("another_class");
     }
}

If you are interested in overriding the markup for the default label container please see the configuration page

Last edited Feb 21, 2011 at 5:14 AM by brk6004, version 2

Comments

No comments yet.