I want to use @Html.TextArea() instead of @Html.EditorFor() but I am getting this error
cannot convert lambda expression to type 'string' because it is not a delegate type.
Model
public class ProductFeature
{
[Required(ErrorMessage = "{0} boş geçilemez")]
[DisplayName("Ürün Özellik Adı")]
public string ProductFeatureName { get; set; }
[Required(ErrorMessage = "{0} boş geçilemez")]
[DisplayName("Ürün Özellik Değeri")]
public string ProductFeatureValue { get; set; }
....
}
View
// Works
@Html.EditorFor(model => model.ProductFeatureName, new { htmlAttributes = new { @class = "form-control" } })
// Throws error
@Html.TextArea(model => model.ProductFeatureName, new { htmlAttributes = new { @class = "form-control" } })
TextArea()? And what does 99% of this code have to do with your question?EditorFor()You question is aboutTextArea()- what code did you try that gave that error?