作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
考虑下面这段代码:
<asp:RegularExpressionValidator
ID="MyTestId"
ValidationGroup="MyTestGroup"
ErrorMessage="You are a silly user. You entered the wrong format for this problem. Please try again. Using this format! ELRLDKX##Z"
ValidationExpression="some unrelated regex"
runat="server"
ControlToValidate="MyTestTextbox">
</asp:RegularExpressionValidator>
有没有办法在 ErrorMessage 字符串中插入某种转义字符,以确保请重试。使用这种格式! ELRLDKX##Z 在另一条线上?我试过了,\n 运气不好。
最佳答案
Validator 在网页上,因此您只需将 html 代码添加到文本中,如 <br />
ErrorMessage="You are a silly user. You entered the wrong format for this problem.<br />Please try again. Using this format! ELRLDKX##Z"
关于asp.net - 如何在 RegularExpressionValidator ErrorMessage 字段中插入换行符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43095537/
我是一名优秀的程序员,十分优秀!