Example #1
0
        public static MvcHtmlString RowLabelInputButton <TModel, TValue, TProperty> (this HtmlHelper <TModel> helper,
                                                                                     Expression <Func <TModel, TValue> > label,
                                                                                     Expression <Func <TModel, TProperty> > value,
                                                                                     string action, string controller,
                                                                                     string toAction, string toController)
        {
            string ret = "<div class=\"row\">";

            ret += "<div class=\"form-group\">";
            ret += helper.LabelFor(label, new { @class = "control-label col-md-2" });
            ret += "<div class=\"col-md-4\">";
            ret += "<div class=\"input-group\">";
            ret += helper.TextBoxFor(value, new { @class = "form-control", disabled = "" });
            ret += "<span class=\"input-group-btn\">";
            ret += helper.ActionLinkPrimary("...", action, controller, new { toAction = toAction, toController = toController });
            ret += "</span>";
            ret += "</div>";
            ret += "</div>";
            ret += "</div>";
            ret += "</div>";

            return(new MvcHtmlString(ret));
        }