how to validate a textbox not to enter the number with ajax

Posted by Shanky11 under ASP.NET AJAX on 2/16/2013 | Points: 10 | Views : 1064 | Status : [Member] | Replies : 1
how to validate a textbox not to enter the number with ajax




Responses

Posted by: Satyapriyanayak on: 2/16/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="Add_update_delete_gridview.WebForm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>

<script src="jquery-1.4.2.js" type="text/javascript"></script>

<script type="text/javascript">
$('.alphaonly').bind('keyup blur',function(){
$(this).val( $(this).val().replace(/[^a-z]/g,'') ); }
);
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="text" name="t1" onkeyup="this.value=this.value.replace(/[^a-z]/g,'');"/>
</div>
</form>
</body>
</html>


If this post helps you mark it as answer
Thanks

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response