Create a gist now

Instantly share code, notes, and snippets.

public static HtmlTag LabelWithInput<T>(this HtmlHelper<T> helper, Expression<Func<T, object>> expression) where T : class
var generator = GetGenerator<T>();
var label = generator.LabelFor(expression, model: helper.ViewData.Model);
var input = generator.InputFor(expression, model: helper.ViewData.Model);
var div = new DivTag();
return div;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment