本文介绍了我们如何只插入整数no.在文本框中.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何只插入整数.在文本框中.
How can we insert only integer no. in textbox.
推荐答案
<asp:textbox id="txtCOB" maxlength="3" runat="server" xmlns:asp="#unknown">
size="2"></asp:textbox>
<asp:comparevalidator runat="server" xmlns:asp="#unknown">
ControlToValidate="txtCOB"
EnableClientScript="True"
id="valCoB"
ErrorMessage="Please enter a number"
Operator="DataTypeCheck"
Type=Integer></asp:comparevalidator>
这篇关于我们如何只插入整数no.在文本框中.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!