ASP.NET NumericUpDown控件 [英] ASP.NET NumericUpDown Control

查看:104
本文介绍了ASP.NET NumericUpDown控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





<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有上面的代码,我希望numricUpDown Control最多为5,最小值为1但是,当我运行它,它不起作用,它超过5和也低于1



请帮助



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

推荐答案

我认为你需要添加increment =1来结束标记中的代码。

加上我认为文本值应保持在最小值和最大值之间,因此选择不同的值来放入文本而不是0。
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'.


这篇关于ASP.NET NumericUpDown控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆