Exemplo n.º 1
0
 protected T Model(ModelInfo info)
 {
     return(info.Value <T>());
 }
Exemplo n.º 2
0
        public static HtmlTag MvcCheckBoxBuilder(ModelInfo info)
        {
            return(new MvcCheckboxElement(info.HtmlId, info.HtmlName, info.RawValue == null ? false : info.Value <bool>()));
            //var tag = HtmlTag.Placeholder();
            //var label = info.ConventionsRegistry().Labels.GenerateTags(info);

            //tag.Children.Add();
            //var errMsg = "";
            //if (info.ValidationFailed)
            //{
            //    errMsg = info.ModelErrors[0].ErrorMessage;
            //}
            //tag.Append(label);
            //tag.Children.Add(new ValidationMessageTag(info.HtmlId, info.ValidationFailed, errMsg));
            //return tag;
        }