views:

101

answers:

1

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?

+2  A: 
<%: Html.TextAreaFor(model => model.DonationMessage) %>
rockinthesixstring
Good heavens I feel dumb. Thank you. This is an example where learning purely by examples can fail you. I didn't see this in an example, and googling just didn't cut it. Had I read more documentation initially, I'd have known. I'm going to go read a book on this. BBL :)
Chris
Try something like this in Google "asp.net mvc html textarea". I'm just learning MVC as well, so I have to be resourceful. I did buy an MVC book on Kindle and it's been a big help as well.
rockinthesixstring
I was googling "textboxfor textarea"... making the wrong assumption was not helping me :)
Chris