reshma k
reshma k

Reputation: 544

validating textbox for the specific range value using javascript in asp.net

i am using javascript validation library file for validating textbox values. now i want to allow user to enter only value in between 0 and 9999999.99 . how to do this by using

$.validator.addMethod
?

Upvotes: 3

Views: 1591

Answers (2)

kamui
kamui

Reputation: 3419

Why don't you just use ASP.NET Validators?

<asp:RangeValidator ID="rValidator" runat="server" 
        ControlToValidate="thatControl"
        MaximumValue="9999999.99"
        MinimumValue="0" 
        Type="Double" />

Upvotes: 2

Ivo
Ivo

Reputation: 3436

You can better use jQuery for this, makes it easier (plug and play).

Check out this sample http://docs.jquery.com/Plugins/Validation/Methods/max

Upvotes: 1

Related Questions