更新面板和验证控件在项目中不起作用 [英] Update panel and Validation Controls does't work in project
本文介绍了更新面板和验证控件在项目中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的朋友们,
当我使用更新面板或在我的项目中使用验证控件时,
他们不工作和页面重新加载。
谁知道关于这个问题的任何事情?
解决方案
试试这个:
< pre lang =HTML> < asp:updatepanel id = upd runat = server >
< contenttemplate >
< < span class =code-leadattribute> asp:textbox id = TextBox1 runat = < span class =code-keyword> server > < / asp:textbox >
< asp:按钮 id = Button1 runat = server text = 按钮 / >
< asp:requiredfieldvalidator id = RequiredFieldValidator1
< span class =code-attribute> runat = server
< span class =code-attribute> ControlToValidate = TextBox1
< span class =code-attribute> ErrorMessage = RequiredFieldValidator >
< / asp:requiredfieldvalidator >
< / contenttemplate >
< / asp:updatepanel >
祝你好运
Dear my friends,
When i use update panel or use Validation controls in my project,
they don''t work and page reload.
Who knows any thing about this issue??
解决方案
try this:
<asp:updatepanel id="upd" runat="server"> <contenttemplate> <asp:textbox id="TextBox1" runat="server"></asp:textbox> <asp:button id="Button1" runat="server" text="Button" /> <asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="RequiredFieldValidator"> </asp:requiredfieldvalidator> </contenttemplate> </asp:updatepanel>
Good luck
这篇关于更新面板和验证控件在项目中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文