对啊!用的就是验证控件,代码如下,本地是能验证
发到服务器上就没有验证了!好奇怪的问题!!!!!!!!!!!!!1
<asp:TextBox id="txt_emaill" runat="server" Width="250px"></asp:TextBox>
<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
ControlToValidate="txt_emaill" ErrorMessage="RegularExpressionValidator" Display="Dynamic">*</asp:RegularExpressionValidator>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator"
ControlToValidate="txt_emaill">*</asp:RequiredFieldValidator>
<asp:Button id="btn_reg" runat="server" Text="提 交"></asp:Button>