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);
        }
示例#2
0
 public static FormContent <TModel> BeginForm <TModel>(this IAnyContentMarker <TModel> contentHelper, FormType type, FormEnctype enctype)
 {
     return(Form <TModel>(contentHelper, type, enctype).BeginContent());
 }
示例#3
0
 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));
 }
示例#4
0
 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);
 }