要求字段验证器对于Ajax FilteredTexboxExtender无法正常工作 [英] Require field validator not working properly for Ajax FilteredTexboxExtender
问题描述
嗨..
在我的页面中,我有一个文本框,正在使用Ajax过滤的texbox Extender过滤数字,需要一个字段验证器来验证该文本框,并使用一个Submit按钮来提交页面.
问题是,当我单击提交"按钮时,必填字段验证器运行良好,页面也将在后面进行编码,我的意思是要求字段验证器不停止页面回发.验证正在触发,第二页是回发.
请帮助我..谢谢提前.
Hi..
In my page i have a textbox for which i am using Ajax Filtered texbox Extender to filter digits,a Require field validator to validate that textbox and a Submit button to submit the page.
The problem is When i am clicking the submit button required field validator is firing good as well as page is also going to code behind, i mean require field validator not stoping page to postback. validation is firing and next second page is postbacking.
Please help me.. Thanks advance.
<asp:TextBox ID="txtpostalcode" runat="server" CssClass="multiline_textbox"MaxLength="6" Width="300px" TabIndex="3" onkeyup="Count(this.id)"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="ftAddress1Zipcode" FilterType="Numbers" TargetControlID="txtpostalcode"runat="server">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"ControlToValidate="txtpostalcode"></asp:RequiredFieldValidator>
推荐答案
确保 CausesValidat您提交按钮的ion 属性为 true ..
这篇关于要求字段验证器对于Ajax FilteredTexboxExtender无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!