I am creating custom html helper for my datepicker.
i want to pass inside mode as it is for TextBoxFor(model=>model.name)
so what i need is, but i have no idea how to do that
- Name of the field
- Value of the field
I have created
public static string DatePickerFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper,Expression<Func<TModel, TProperty>> expression){
//return object.name
var expressionText = ExpressionHelper.GetExpressionText(expression);
}
Name of the field
Value of the field