public static string ToEnctype(this FormEnctype enctype) { switch (enctype) { case FormEnctype.UrlEncoded: return("application/x-www-form-urlencoded"); case FormEnctype.Multipart: return("multipart/form-data"); case FormEnctype.TextPlain: return("text/plain"); } return(string.Empty); }
public static FormContent <TModel> BeginForm <TModel>(this IAnyContentMarker <TModel> contentHelper, FormType type, FormEnctype enctype) { return(Form <TModel>(contentHelper, type, enctype).BeginContent()); }
public static IWriter2 <Form <TModel>, FormContent <TModel> > Form <TModel>(this IAnyContentMarker <TModel> contentHelper, FormType type, FormEnctype enctype) { return(Form <TModel>(contentHelper).Type(type).Enctype(enctype)); }
public static IWriter2 <T, FormContent <TModel> > Enctype <T, TModel>(this IWriter2 <T, FormContent <TModel> > target, FormEnctype value) where T : Form <TModel> { target.Item.EnctypeValue = value; return(target); }