Help needed in radnumeric textbox

2 posts, 0 answers
  1. Aneesh
    Aneesh avatar
    9 posts
    Member since:
    May 2012

    Posted 25 Jun 2012 Link to this post

    Hi,

    How can I have a rad numeric textbox which allow to enter only from 1 to 100. And it should be 0 if user enters a number greater than 100.

    Thanks & regards,
    Aneesh Daniel
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Jun 2012 Link to this post

    Hi,

    Try the following javascript to achieve your scenario.

    JS:
    <script type="text/javascript" >
     function OnValueChanging(sender, args)
       {
         if (args.get_newValue() > 100)
         {
            args.set_cancel(true);
            sender.set_value(0);
         }
       }
    </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top