A Place to Learn Ur-self…


<html xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head runat=”server”>
<title></title>
<script type=”text/javascript”>
function AllowAlphabet(e)
{
isIE = document.all ? 1 : 0
keyEntry = !isIE ? e.which : event.keyCode;
if (((keyEntry >= ’65’) && (keyEntry <= ’90’)) || ((keyEntry >= ’97’) && (keyEntry <= ‘122’)) || (keyEntry == ’46’) || (keyEntry == ’32’) || keyEntry == ’45’)
return true;
else
{
alert(‘Please Enter Only Character values.’);
return false;
}
}
</script>

</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:TextBox ID=”TextBox1″ runat=”server” onkeypress=”return AllowAlphabet(event)” ></asp:TextBox>
</div>
</form>
</body>
</html>

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: