I want to generate a MVC-editor with the function
System.Web.Mvc.Html.EditorExtensions.EditorFor<TModel, TValue>(
this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression,
object htmlAttributes = null)
The problem is the
Expression<Func<TModel, TValue>> expression
because I have only the name of the property. I'm sure the property exist and I can get the actual instance of the Model.
How can I create the correct parameter?
Edit: To make it more clear: I have the model, I have the name of the property and want to create the Expression>.
Thanks!
Peter
Html.EditorFor(model=>model.SomeProperty);?