使用ASP.Net Validations控件 [英] Working with ASP.Net Validations controls

查看:80
本文介绍了使用ASP.Net Validations控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,





我有一个像txtMobile这样的文本框,有两个验证控件,如RequiredFiledValidator和RegularExpression,现在我的问题是什么时候输入错误的手机号码错误信息显示在列的中间,我不想显示我需要的地方代替RequiredFieldValidator错误信息。





请任何人帮助我。



提前致谢。

Dear Friends,


I have one textbox like txtMobile with two validation controls like RequiredFiledValidator & RegularExpression, now my problem is whenever enter wrong mobile number the error message shows at middle of the column, i don't want to display that place i need in place of RequiredFieldValidator error message.


Please any one help me.

Thanks in advance.

推荐答案

< b>试试这个,



设置Display =Dynamic就可以了。



http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.basevalidator.display%28v=VS.100%29.aspx [ ^ ]



http://www.dotnet-tricks.com/Tutorial/aspnet/YDGE170612-使用-Display-property.html进行适当的验证 - 控制 - 错误 - 消息对齐[ ^ ]


使正则表达式和必需的字段验证器显示为动态。
Make the display as dynamic for both Regular expression and required field validators.


非常欢迎...





只需为两个控件添加
You are Very Welcome...


Just Add
Display="Dynamic"

属性。



如果找到工作,点击接受解决方案......


这篇关于使用ASP.Net Validations控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆