本文介绍了为什么TextChanged不使用AutoPostBack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个TextBox,用户可以在其中执行搜索之前先输入内容.键入时,程序会将它们与从数据库中获取的某些值进行比较. 因此,我尝试将TextChanged事件处理程序与UpdatePanel一起使用,并将AutoPostBack设置为true. 但是,除非您实际执行诸如单击按钮之类的回发操作,否则它不会起作用. 知道我该如何实现吗? 谢谢.
Hi, I have this TextBox where users will type things before performing a search. As they type, the program compares them with some values fetched from the database. So I was trying to use the TextChanged event handler with UpdatePanel and AutoPostBack turned to true. But it doesn''t work unless you actually perform a postback like click a button. Any idea how I can achieve this? Thanks.
推荐答案刚刚找到此 [ ^ ],是的,它只会触发当您退出时. 至于使用CSS设置文本框的格式(样式),请在此处使用几个示例 [ ^ ] . 如果您不反对jQuery方法,那么我的博客上有大量示例(单击sig). 干杯. Just found this[^], so, yeah, it only fires when you tab out. As for formatting (styling) the textbox with CSS, here''s a couple of samples[^], with source, and an online editor. If you''re not opposed to the jQuery approach, I have a ton of samples on my blog (click sig). Cheers.
我知道我本身并没有回答您的问题,但这仍然可以解决问题. 有什么原因不能使用自动填充 [ ^ ]控件? 它是免费的,脚本位于MS CDN上. 干杯. I know I''m not answering your question per se, but this might still solve the problem. Is there any reason you can''t use the Autocomplete[^] control? It''s free, and the scripts are on the MS CDN. Cheers.
嘿,伙计,我在附加代码,请参考它,它将对您有帮助. 我在textbox1文本更改jquery上调用了服务器端方法. 并从服务器端方法获取响应并相应地更新ui. 我希望你能得到提示. ;) hey buddy , i m attaching code please refer to it which will help you. i have called server side method on textbox1 text change jquery. and it gets response from server side method and updates ui accordingly. i hope you will get hint . ;) <html xmlns="www.w3/1999/xhtml"> <head id="Head1" runat="server"> <title>Untitled Page</title> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript">
更多推荐
为什么TextChanged不使用AutoPostBack
发布评论