This code:
<%: Html.TextBoxFor(model => model.DonationMessage) %>
Renders an input type=text
tag, but I want a textarea
. I tried this in my entity but it didn't make a difference:
[DataType(DataType.MultilineText)]
public string DonationMessage { get; set; }
Any idea?
<%: Html.TextAreaFor(model => model.DonationMessage) %>
if u want your DataType attribute to be at work you can use EdiotrFor method instead
<%: Html.EditorFor(model => model.DonationMessage) %>
this will take into account your DataType attribute plus there are dozen other things that you can do with Editor Templates
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With