asp.net - adding a css class with Html.TextBox -


Trying to add a 'class' html attribute, but I think that the keyword 'class' causes problems Are getting

  & lt;%: Html.TextBox ("name", "value", new {class: "required"})%>  

Is there any remedy?

Just prefix 'class' is one as a '@'.

  & lt;%: HTML Textbox ("name", "value", new {@ class: "required"})%>  

If you need some background on @Keyword, there is a good SO question to read.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -