I am making custom HTML support for my datepicker.
I want to pass in mode because it's TextBoxFor (model = & gt; model.name)
so what do I want, but I do not know how to do this
- Field name
- The value of the field
I have made
Public stable string date picturefront & lt; TModeel, TProperty & gt; (This HtmlHelper & lt; TModeel & gt; HTMLHelper, expression & lt; Func & lt; TModeel, TProperty & gt; & gt; Expression) {// Return Object. Name var expression text = expression. Helper. GetExpressionText (expression);
-
field name
string fullHtmlFieldName = htmlHelper .ViewContext .ViewData. TemplateInfo .GetFullHtmlFieldName (ExpressionHelper.GetExpressionText (expression));
The value of the field
var metadata = modelmatetta.freem LambdaXpress (expression, HTML helper.jyzedata); Object value = metadata.model; // will be type TProperty
-
Comments
Post a Comment