I am doing a series of web pages where user interfaces are a central part; that is, input text fields, textareas, radio buttons etc. Due to the fact that I do not want to do it manually I have made a database representation of a UI, and then creating the UIs dynamically, however...
When using objects as HtmlInputText, HtmlTextArea etc. (the HTML server controls) I canont set the style (CSS) dynamically
. The Web controls have got a property CssClass which would be great to have however this is not the case.
Is there a way, which is not a hack, to solve this? There must be others having this problem. Naturally you could do the hack, like...
new LiteralControl("<INPUT TYPE='text' CLASS='someClass'>")
however this is not nice! Didn't Microsoft thought of this!?