public string SomeFunction(this HtmlHelper html, Expression> expression){ var valueOfExpression = html.ValueFor(expression); //do your stuff }