@Html.InputTextFor(s => s.name)
取得s.name中的name
dynamic exp = expression.Body.GetType().GetProperty("Member").GetValue(expression.Body, null);
var strName = (string)exp.Name;
strName为name
时间: 2024-12-20 05:28:11
@Html.InputTextFor(s => s.name)
取得s.name中的name
dynamic exp = expression.Body.GetType().GetProperty("Member").GetValue(expression.Body, null);
var strName = (string)exp.Name;
strName为name