<script language="Javascript"> function AllowAlphabet(e) { document.getElementById("div_name").innerHTML=""; document.getElementById("div_name").style.display="none"; 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 { document.getElementById("div_name").innerHTML="<B>Enter only Characters</B>"; document.getElementById("div_name").style.display="block"; return false; } } </script
using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class FO_MASTER : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { txt_FieldOfficerName.Attributes.Add("onkeypress", "AllowAlphabet(e)"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)