一段简单的代码。我注意到当我将鼠标悬停在'*'上时,工具提示不显示。
工具提示是否在Internet Explorer 10中工作?
代码:
<p>Username:<asp:TextBox ID="UsernameTextBox" runat="server"></asp:TextBox></p>
<asp:RequiredFieldValidator ID="UsernameRequiredFieldValidator" runat="server"
ErrorMessage="Your Username is Required" ControlToValidate="UsernameTextBox"
Text="*">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="UsernameRegularExpressionValidator" runat="server"
ErrorMessage="Please only use letters and numbers with no spaces."
ControlToValidate="UsernameTextBox" Text="*"
ToolTip="Please only use letters and numbers with no spaces."
ValidationExpression="\w{6,14}">
</asp:RegularExpressionValidator>
此致
答案 0 :(得分:0)
我使用过您的代码。它适用于IE10和Chrome浏览器。可能是你搞砸了RegularExpressionValidator错误信息和RequiredFieldValidator错误信息