public static IHtmlString UploadFor(this KenticoForm html, IForm model, string controlName, IControlRenderer customRenderer) { var control = model.Controls.FirstOrDefault(ctrl => ctrl.Name.Equals(controlName, StringComparison.OrdinalIgnoreCase)); var renderedControl = customRenderer.Render(control); return(MvcHtmlString.Create(renderedControl)); }
public static IHtmlString ListBoxFor <TControl>(this KenticoForm html, TControl control, IControlRenderer customRenderer) where TControl : IControl { var renderedControl = customRenderer.Render(control); return(MvcHtmlString.Create(renderedControl.ToString())); }
public static IHtmlString TextBoxFor(this KenticoForm html, IControl control, IControlRenderer customRenderer) { var renderedControl = customRenderer.Render(control); return(MvcHtmlString.Create(renderedControl)); }
public static IHtmlString EmailFor <TControl>(this KenticoForm html, TControl control, IControlRenderer renderer) where TControl : IControl { var renderedControl = renderer.Render(control); return(MvcHtmlString.Create(renderedControl)); }