public static HtmlTag FormFor(this IFubuPage view, object input) { if (input is string) { return(view.FormFor(input.As <string>())); } var search = ChainSearch.ByUniqueInputType(input.GetType(), "POST"); return(view.FormFor(search, input)); }
public static HtmlTag FormFor <TController>(this IFubuPage view, Expression <Action <TController> > expression) { var search = ChainSearch.ForMethod(expression, "POST"); return(view.FormFor(search, null)); }
public static HtmlTag FormFor <TInputModel>(this IFubuPage page) where TInputModel : new() { var search = ChainSearch.ByUniqueInputType(typeof(TInputModel), "POST"); return(page.FormFor(search, new TInputModel())); }
public static HtmlTag FormFor <TInputModel>(this IFubuPage page, TInputModel model) { return(page.FormFor(ChainSearch.ByUniqueInputType(model.GetType(), "POST"), model)); }
public void basic_form_for() { page.FormFor().ShouldNotBeNull().ShouldBeOfType <FormTag>(); }