Reputation: 4733
I'm trying to set textarea text after retrieving it from Facebook. I can retrieve name and write it in Sql, but can't set it in textarea.. Here's my textarea:
@Html.TextAreaFor(m => m.Name, new { id = "NameBox", placeholder = "Name" })
I have tried this:
@Html.TextAreaFor(m => m.Name, ViewData["name"], new { id = "NameBox", placeholder = "Name" })
but here's an error: no overloads for method TextAreaFor that takes 3 arguments.. Is there any other way to assign this value in my text area?
Upvotes: 0
Views: 1903
Reputation: 8992
@Html.TextAreaFor(m => m.Name, new { id = "NameBox", placeholder = "Name", Value = ViewData["name"]})
Upvotes: 1