The only way I can think of to do that is with usage of placeholder attribute:
@Html.TextBoxFor(model => model.SomeProperty, new { placeholder = Model.SomeProperty })
I'm assuming you are using DataAnnotations for your models. So for example if you want the Display attribute value to be in your placeholder then you need to write this extension method to fetch data annotation DISPLAY attribute:
public static class GetAttributeExtension
{
public static string GetDisplayName<TModel, TValue>(this TModel model, Expression<Func<TModel, TValue>> expression)
{
return GetDisplayName(expression);
}
public static string GetDisplayName<TModel, TValue>(Expression<Func<TModel, TValue>> expression)
{
var propertyName = ((MemberExpression)expression.Body).Member.Name;
return typeof(TModel).GetAttribute<DisplayAttribute>(propertyName).Name;
}
}
And then you can do something like this:
@Html.TextBoxFor(model => model.SomeProperty, new { placeholder = Model.GetDisplayName(m => m.SomeProperty) })
@Html.EditorForwould work...