This is a migrated thread and some comments may be shown as answers.

Help needed in radnumeric textbox

1 Answer 31 Views
Input
This is a migrated thread and some comments may be shown as answers.
Aneesh
Top achievements
Rank 1
Aneesh asked on 25 Jun 2012, 11:30 AM
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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Jun 2012, 11:50 AM
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.
Tags
Input
Asked by
Aneesh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or