asp.net mvc 2 EditorFor() and html properties
Posted
by chandmk
on Stack Overflow
See other posts from Stack Overflow
or by chandmk
Published on 2009-10-26T14:57:38Z
Indexed on
2010/04/08
20:23 UTC
Read the original article
Hit count: 744
asp.net-mvc-2
|asp.net-mvc
Asp.Net MVC 2.0 preview builds provide helpers like
Html.EditorFor(c => c.propertyname)
If the property name is string, the above code renders a texbox.
What if I want to pass in MaxLength and Size properties to the text box or my own css class property?
Do I need to create one template for each size and length combinations in my application? If so, that doesn't make the default templates that usable.
© Stack Overflow or respective owner