Hmm... Actually my question is if I can call a codebehind function from a keyup/press/down event without using javascript on a asp:textbox or is it required for me to use js or jquery?
I can call a code behind funfction easily with that event but not wit a keyup event in a asp:textbox, why is that? I'm kind of new in asp and I'm trying to understand this kind of things!
KC Torres
Member
2 Points
18 Posts
Text Box onkeyup event?
Nov 28, 2012 01:33 PM|LINK
Hi,
I need to call a code behind method whenever the user enters a number in a asp:textbox, is this possible? If so, how? I have tried this
but it launches a JScript runtime error when I input a number, what am I doing wrong?
Thanks in advance!
RameshRajend...
Star
7983 Points
2099 Posts
Re: Text Box onkeyup event?
Nov 28, 2012 01:34 PM|LINK
http://forums.asp.net/p/1327826/2708349.aspx/1?Re+Problem+in+saving+images+from+one+web+site+into+other+website
KC Torres
Member
2 Points
18 Posts
Re: Text Box onkeyup event?
Nov 28, 2012 01:38 PM|LINK
Hmm... Actually my question is if I can call a codebehind function from a keyup/press/down event without using javascript on a asp:textbox or is it required for me to use js or jquery?
thanks
CruzerB
Contributor
5399 Points
1098 Posts
Re: Text Box onkeyup event?
Nov 28, 2012 01:43 PM|LINK
Hi,
You cannot. You have to use javascript/jquery.
My Technical Blog
KC Torres
Member
2 Points
18 Posts
Re: Text Box onkeyup event?
Nov 28, 2012 01:56 PM|LINK
Could you please give me an example how to?
Thanks!
KC Torres
Member
2 Points
18 Posts
Re: Text Box onkeyup event?
Nov 28, 2012 02:06 PM|LINK
Also, why isn't this allowed
but this is
I can call a code behind funfction easily with that event but not wit a keyup event in a asp:textbox, why is that? I'm kind of new in asp and I'm trying to understand this kind of things!
Thanks!
CruzerB
Contributor
5399 Points
1098 Posts
Re: Text Box onkeyup event?
Nov 29, 2012 12:59 AM|LINK
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox_events.aspx
You can refer to this document. It show all the events for TextBox control.
Then for "KeyUp" event, it is actually from HTML textbox control, you can refer to this link for more information on HTML controls event.
http://www.w3schools.com/jsref/dom_obj_event.asp
My Technical Blog
asteranup
All-Star
30184 Points
4906 Posts
Re: Text Box onkeyup event?
Nov 29, 2012 03:53 AM|LINK
Hi,
Can you share your requirment? It does not looks good to do a postback on keyup from user experience.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog