samira riazati
samira riazati

Reputation: 525

Html.Kendo().MaskedTextBox() with two length?

I have this MaskedTextBox:

                    <div style="direction:ltr;padding-left:20px;">
                        @(Html.Kendo().MaskedTextBox()
                              .Name("nationalityCode")
                              .Mask("000000000000").HtmlAttributes(new { @class = "login-input user-pass", width = "300px", placeholder = "Enter you code" })
                              )

                    </div>

My problem is NationalityCode can be 8 or 12 length , If I use above code,then in Runtime enter a code with 8 length, it will pass null to controller .

Upvotes: 1

Views: 385

Answers (0)

Related Questions