为什么验证控制不能在asp.net中正常运行 [英] why validation controls not wroking properly in asp.net
本文介绍了为什么验证控制不能在asp.net中正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友们,
i我发布了一个加入我们表单的网站,当我点击提交按钮数据时提交了验证..所以请给我打电话我需要做什么..?
请给我打电话....
Hi friends,
i am published one website in that join us form when i am click on submit button data was submitted with out validation ..so please tel me what i am have to do..?
plese tel me....
推荐答案
你好,
如果您在page.aspx中正确应用验证控件,例如
Hello,
If you proper apply validation controls in your page.aspx e.g.
<asp:requiredfieldvalidator runat="server" id="rfv1" controltovalidate="txtName" errormessage="Required" forecolor="Red" xmlns:asp="#unknown" />
您只需要更改web.congig文件,只需在配置标记内添加以下代码。
You just need to change your web.congig file and just add below code inside configuration tag.
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
这就是全部。
That's all.
这篇关于为什么验证控制不能在asp.net中正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文