Search code examples
asp.netgridviewtextboxitemtemplatetemplatefield

ASP.NET textbox cssClass gets overrwritten in GridView ItemTemplate after rendering


I have a textbox inside a TemplateField column for a gridview. When I set the cssClass property for the textbox, it gets overwritten by a "textBox" class in the rendered web page. Is this normal behavior? (.NET 3.5)

As a workaround I added a 'style' attribute.


Solution

  • It seems that SkinId has precedance over CssClass: http://forums.asp.net/t/1469529.aspx/1