private void SetupDataBind(IHtmlWriter htmlWriter) { htmlWriter .Prop("id", this.propertyName) .Prop("name", this.propertyName) .Prop("data-bind", "value:" + this.field.PropertyName); }
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); }
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); }
protected override void WriteHtml(IHtmlWriter writer, FieldInfo field) { writer .Prop("data-val-date", "Tarih Formatı Yanlış") .Tag("input", TagTypes.Unpaired); }
protected override void WriteHtml(IHtmlWriter writer, FieldInfo field) { writer .Prop("data-val-number", "Bu Alana Yalnızca Rakam Girebilirsiniz.") .Tag("input", TagTypes.Unpaired); }
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); }