Пример #1
0
        protected sealed override void WriteHtml(IHtmlWriter writer, FieldInfo field)
        {
            switch (field.DataType)
            {
                case JsType.number:
                    writer.Prop("data-val-number", "Bu Alana Yalnızca Rakam Girebilirsiniz.");
                    break;
            }

            writer.Tag("input", TagTypes.Unpaired);
        }
Пример #2
0
        protected override void WriteHtml(IHtmlWriter writer, FieldInfo field)
        {
            writer
                //.Prop("class", "k-textbox form-control")
                .Prop("rows", "3");

                //MaxLength
            if (field.MaxLength > 0)
            {
                writer.Prop("maxlength", field.MaxLength)
                    .Prop("data-val-length", "Bu Alana En Fazla " + field.MaxLength + " Karakter Girebilirsiniz.")
                    .Prop("data-val-length-max", field.MaxLength);
            }
            //


            writer.Tag("textarea", TagTypes.Control);
        }
Пример #3
0
        protected override void WriteHtml(IHtmlWriter writer, FieldInfo field)
        {
            writer
                .Prop("class", "k-textbox form-control");

                //MaxLength
            if (field.MaxLength > 0)
            {
                writer.Prop("maxlength", field.MaxLength)
                    .Prop("data-val-length", "Bu Alana En Fazla " + field.MaxLength + " Karakter Girebilirsiniz.")
                    .Prop("data-val-length-max", field.MaxLength);
            }
            //

            switch (field.DataType)
            {
                case JsType.number:
                    writer.Prop("type", "number");
                    writer.Prop("data-val-number", "Bu Alana Yalnızca Rakam Girebilirsiniz.");
                    break;
                case JsType.date:
                    writer.Prop("type", "date");
                    writer.Prop("data-val-date", "Tarih Formatı Yanlış.");
                    break;
            }


            writer.Tag("input", TagTypes.Unpaired);
        }