如何在按键事件上调用函数...? [英] How to call a function on keypress event...?

查看:121
本文介绍了如何在按键事件上调用函数...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在asp文本框的按键事件中调用c#函数,而无需将其声明为网络方法.

如果可能的话,请给我一些建议..

Is it possible to call a c# function inside asp text box''s key press event, with out declaring it as a web-method.

if it is possible then please give me some suggestion to do it..

<asp:TextBox ID="txtSearch" runat="server"
           ontextchanged="txtSearch_TextChanged">





protected void txtSearch_TextChanged(object sender, EventArgs e)
        {
            //its working
        }




我试过了,但是不起作用...




i tried this but its not working...

推荐答案

看看:
http://www.dreamincode.net/forums /topic/67474-accessing-a-code-behind-function-on-keypress-event/ [
have a look at:
http://www.dreamincode.net/forums/topic/67474-accessing-a-code-behind-function-on-keypress-event/[^]


这篇关于如何在按键事件上调用函数...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆