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
1.4m articles
1.4m replys
5 comments
57.0k users