如何在验证摘要中添加错误消息 [英] How to add error message in validation summary
本文介绍了如何在验证摘要中添加错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请让我知道,
如何在验证摘要中对(C#)错误消息进行编码.
例如:ASPX页面
-------------
Hi,
Please let me know,
How to code behind(C#) error messages in validationsummary.
Ex: ASPX Page
-------------
<asp:ValidationSummary ID="LoginUserValidationSummary" Width="300px" runat="server" CssClass="error"
ValidationGroup="LoginUserValidationGroup"/>
c#
-------
c#
-------
public void btnclick(....)
{
string strErrorMsg="UserId not found"
}
我们可以在验证摘要中显示strErrorMsg吗?
Can we display strErrorMsg in validation summary
推荐答案
听说过验证程序的错误消息"属性吗?
这会给和想法
了解ASP.NET验证技术 [
Have heard about "Error Message" property of a validator ?
this will give and idea
Understanding ASP.NET Validation Techniques[^]
这篇关于如何在验证摘要中添加错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文