Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery asp.net textChanged服务器端事件未激发_Jquery_Asp.net - Fatal编程技术网

Jquery asp.net textChanged服务器端事件未激发

Jquery asp.net textChanged服务器端事件未激发,jquery,asp.net,Jquery,Asp.net,我们的团队开发了一个大型应用程序,现在我们需要为系统中的所有文本框应用大写字母。由于项目的范围,在代码隐藏页面中执行此操作非常困难。我提出了以下jquery,它运行良好,但问题是一旦我应用了它,asp.net textChanged服务器端事件就不会触发 function pageLoad(sender, args) { $("input:text").not(".textChangedClass").bind("input", function (e) {

我们的团队开发了一个大型应用程序,现在我们需要为系统中的所有文本框应用大写字母。由于项目的范围,在代码隐藏页面中执行此操作非常困难。我提出了以下jquery,它运行良好,但问题是一旦我应用了它,asp.net textChanged服务器端事件就不会触发

    function pageLoad(sender, args) {
        $("input:text").not(".textChangedClass").bind("input", function (e) {
            var start = this.selectionStart,
                end = this.selectionEnd;
            this.value = this.value.toUpperCase();
            this.setSelectionRange(start, end);
        });
    }

非常感谢您的帮助

jQuery不会引起回复

我假设您使用的是ASP.NET web表单

如果需要回发,应在服务器控件上设置
AutoPostBack=true


您能告诉我们如何调用
pageLoad
吗?

请告诉我们您的服务器端代码。textChanged事件不会在上述jquery中触发。若我在jquery上面注释,一切都会正常工作,我已经使用了AutoPostBack=true,但问题是textChanged事件不会在上面的jquery中触发。如果我在jquery上面加了注释,那么一切都正常,为什么不使用服务器端代码更改文本呢?