Friday, 31 July 2015

Mask Input Of Telerik MVC


Mask Input Of Telerik MVC 

@(Html.Kendo().MaskedTextBoxFor(model => model.Fax)
                                          .Name("Fax") //The name of the maskedtextbox is mandatory. It specifies the "id" attribute of the widget.
                                          .Mask("(000)000-0000") //Set mask value of the maskedtextbox
                                          .Value(Model.Phone) //Set value of the maskedtextbox
                                    )

Model Declaration  

[DisplayName("Fax"), AllowHtml]
        public string Fax { get; set; } 

No comments:

Post a Comment