c# - Only allowing Uppercase characters in a text box -
i working on mvc project in text box allow user enter uppercase characters.
this works in razor when doing following:
@html.textboxfor(m => m.name, new{@class="upper"} i apply relevant code in css file
however if have following code in razor doesnt work:
@html.textbox("name", new{@class="upper"} all text box showing {@class="upper"}
does know doing wrong?
i believe second parameter in @html.textbox helper initial value of textbox. if not want specify initial value either need pass null or empty string , attributes:
@html.textbox( "name", null, new { @class = "upper" })
Comments
Post a Comment