Reet Reet - 4 months ago 13
Javascript Question

Numeric textboxes in Asp.net MVC

Is there any way to have a feature like a Numeric textbox in MVC which has all the validations in place(Do not want to use Kendo as it has all kinds of Validation probblems) ?

Answer

You can validate with javascript like this:

function isNumber(n) {
    return !isNaN(parseFloat(n)) && isFinite(n);
}

from here

Comments