Click here to Skip to main content
15,888,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#


XML
<asp:TextBox ID="txtMarks" runat="server" Text="0" Height="22px" MaxLength="2" TextMode="Number" Width="41px"></asp:TextBox>
                        <asp:NumericUpDownExtender ID="UaDExtender" Minimum="1" Maximum="5"
                             runat="server"
                            TargetControlID="txtMarks"
                            ></asp:NumericUpDownExtender>


i have the above code and i want the numricUpDown Control to go up to 5 and its minimum value to be 1 but when i run it, it does not work, it goes above 5 and also below 1

please help
Posted
Updated 3-Dec-17 12:34pm

1 solution

I think you need to add increment="1" to the code in closing tag.
Plus i think text value should be kept between min and max value so chose a different value to put in text than '0'.
 
Share this answer
 
v2
Comments
Member 10239837 22-Aug-14 5:04am    
i did that but still its still the same........and the increment does not work if i changed 1 to 2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900