Hello i need to work on keypress event of asp textbox but keypress event not available for the asp textbox. Is there alternative available for this problem? Plz help!
Make use of keypress event of javascript + textbox
and call the serverside function by using ajax or using pagemthods.
.cs file [ScriptMethod, WebMethod] public static string docall() { return "Hello"; } .aspx file <script type="text/javascript"> function btnAccept_onclic() { PageMethods.docall(onSuccess, onFailure); } function onSuccess(result) { alert(result); } function onFailure(error) { alert(error); } </script>
check this : http://blogs.microsoft.co.il/blogs/gilf/archive/2008/10/04/asp-net-ajax-pagemethods.aspx
2.1m questions
2.1m answers
60 comments
57.0k users