public static class CustomHtmlHelper { public static MvcHtmlString MyFieldBox(this HtmlHelper html, Expression> expression, String title) { StringBuilder sb = new StringBuilder(); sb.AppendLine(""); sb.AppendLine("\"); sb.AppendLine("{0}", title); sb.AppendLine(""); sb.AppendLine( htmlHelper.TextBoxFor( expression, new { @class = "form-control inline-input" }) ); sb.AppendLine(""); sb.AppendLine( htmlHelper.ValidationMessageFor( expression ); sb.AppendLine(""); return new MvcHtmlString( sb.ToString() ); } } Source: stackoverflow.com