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!
See Question&Answers more detail:osHello 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!
See Question&Answers more detail:osMake 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