Skip to content
Loading
  • Amit Kumar Singh
    +1

    Use plain Javascript like this:

    Code
     function handleChange(input) { if (input.value  100) input.value = 100; }

    Then declare the input box like this:

    Code

    Because you have hooked this function to onchange(), it will work even if a user copy / pastes something into the input box.

    +1
  • Chandu Kumawat
    0
    refer this 
     
     
    http://asp-net-example.blogspot.in/2009/02/aspnet-rangevalidator-how-to-validate_03.html 
    0
  • 0
    This only shows error message, and user can type the value if we are using range validator and also I need to do it according to the user.
    0
  • Amit Kumar Singh
    0
    0
  • 0
    @Amit 
    I have done like this, I dont know the remaining how to do.
    ontextchanged="TextBox7_TextChanged" input type="text" onchange="handleChange(this);">
    0
  • 0
    Thank you sir. The code is working perfectly sir. But I have two users, admin and staff. If staff is login then he can type only up to 100
    and admin no problem. I can given the users access through session. But how can I do that session to this.
    0