本文介绍了多线文本框上的Ajax FilteredTextBoxExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 嘿所有, 我在 Ajax FilteredTextBoxExtender 中遇到问题。 这是我的示例代码 文本框 < asp:TextBox ID = txthdrRemarks runat = server CssClass = textBox TextMode = MultiLine 宽度 = 400px > < / asp:TextBox > Ajax FilteredTextBoxExtender < ajaxToolkit:FilteredTextBoxExtender ID = & quot; Filteredtextboxextender1&安培; QUOT; runat = & quot; server& quot; QUOT; FilterType = & quot; Custom, 数字, 大写字母, LowercaseLetters& quot; TargetControlID = & quot; txthdrRemarks& quot; ValidChars = & quot; az / -\。,!@#$%^& amp; *()+ |〜& lt;& gt ;;:&#39; {} [] - ? > < / ajaxToolkit:FilteredTextBoxExtender > 当我在taxtbox中写道时工作正常。但是当我按下输入密钥 时它无法正常工作。 请帮帮我.. 问候 Rikin 解决方案 %^& amp; *()+ |〜& lt;& gt ;;:&#39; {} [] - ? > < / ajaxToolkit:FilteredTextBoxExtender > 当我用taxtbox写它的工作正常。但是当我按下输入密钥 时它无法正常工作。 请帮帮我.. 问候 Rikin 您还应该将输入密钥添加到您的有效字符中。 protected void Page_Load( object sender,EventArgs e) { FilteredTextBoxExtender1.ValidChars = FilteredTextBoxExtender1.ValidChars + \\\\ n; } == OR == 你可以编写自己的扩展器。看看这个 link。 [ ^ ] 祝你好运, OI 将其工作100%。它限制无效字符并接受输入... < cc1:FilteredTextBoxExtender ID = txtRemark_FilteredTextBoxExtender runat = server 已启用 = True FilterMode = InvalidChars InvalidChars = 〜!@ Hey all,I am facing problem in Ajax FilteredTextBoxExtender.Here is my sample codeTextbox<asp:TextBox ID="txthdrRemarks" runat="server" CssClass="textBox" TextMode="MultiLine" Width="400px"></asp:TextBox>Ajax FilteredTextBoxExtender<ajaxToolkit:FilteredTextBoxExtender ID="Filteredtextboxextender1" runat="server" FilterType="Custom, Numbers, UppercaseLetters, LowercaseLetters" TargetControlID="txthdrRemarks" ValidChars="a-z/-\.,!@#$%^&*()+|~<>;:'{}[]-?> </ajaxToolkit:FilteredTextBoxExtender>When ever i write in taxtbox its working fine. but when i press "Enter Key"its not working.Please help me..RegardsRikin 解决方案 %^&*()+|~<>;:'{}[]-?> </ajaxToolkit:FilteredTextBoxExtender>When ever i write in taxtbox its working fine. but when i press "Enter Key"its not working.Please help me..RegardsRikinYou should add the "Enter Key" to your valid chars as well.protected void Page_Load(object sender, EventArgs e){ FilteredTextBoxExtender1.ValidChars = FilteredTextBoxExtender1.ValidChars + "\r\n";}==OR==You can write your own extender. Have a look at this link.[^]Good luck,OIPut this its working 100%. It restricts invalid characters and accepts enter too...<cc1:FilteredTextBoxExtender ID="txtRemark_FilteredTextBoxExtender" runat="server" Enabled="True" FilterMode="InvalidChars" InvalidChars="~!@ 这篇关于多线文本框上的Ajax FilteredTextBoxExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-13 12:04