<asp:TextBox runat="server" id="box"/>
<asp:RequiredFieldValidator runat="server" id="val1" ErrorMessage="必须输入" ControlToValidate="box" display="none"/>
<asp:RegularExpressionValidator runat="server" id="validator1" ControlToValidate="box" ErrorMessage="只能输入汉字、英文、数字和下划线,且字数不能超过1000" ValidationExpression="^([\u4e00-\u9fa5]|[0-9_a-zA-Z]){1,1000}$" display="none"/>
<asp:validationSummary ShowSummary="false" ShowMessageBox="true" HeaderText="错误:" runat="server" id="valsum"/>
<asp:Button runat="server" id="btn" Text="提交"/>
<asp:RequiredFieldValidator runat="server" id="val1" ErrorMessage="必须输入" ControlToValidate="box" display="none"/>
<asp:RegularExpressionValidator runat="server" id="validator1" ControlToValidate="box" ErrorMessage="只能输入汉字、英文、数字和下划线,且字数不能超过1000" ValidationExpression="^([\u4e00-\u9fa5]|[0-9_a-zA-Z]){1,1000}$" display="none"/>
<asp:validationSummary ShowSummary="false" ShowMessageBox="true" HeaderText="错误:" runat="server" id="valsum"/>
<asp:Button runat="server" id="btn" Text="提交"/>