· Vincent Bourdon · 1 min read
Spécifier le tag de rendu d'un WebControl
Par défaut un custom WebControl génère un élément Span dans le rendu html.
Par défaut un custom WebControl génère un élément Span dans le rendu html.
Pour changer le type de tag il suffit d'overrider la propriété TagKey.
Voici un exemple:
//C#protected override System.Web.UI.HtmlTextWriterTag TagKey { get { return HtmlTextWriterTag.Div; } }