Search code examples
asp.net-mvcstrong-typing

What asp.net-mvc strongly typed helpers uses underneath?


For example, if i use this in view:

${Html.TextBoxFor(u=>u.UserName)}

How can i

var name = [xxx].NameFor<User>(u=>u.UserName);

from elsewhere? Is that possible?


Solution

  • System.Web.Mvc.ExpressionHelper.GetExpressionText(LambdaExpression expression)