// This is for the Key Press Event
function Keypress_Event()
{
// This is for Getting the Source Element..
var objTxtBox = window.event.srcElement;
// declare the variable for the bool value.
var isOk = false;
// Here we need not backspace keycode = 8 and the delete keycode 46
isOk = ( event.keyCode == 8 || event.keyCode == 46 ) ? false:true; event.returnValue=isOk;
} And in your aspx call the keypress as
asp:TextBox ID="txtTest" runat="server" onkeydown="Keypress_Event()"
Wednesday, September 16, 2009
Subscribe to:
Post Comments (Atom)
1 comment:
Perfect! This solved my issue.
I tried in IE and chrome also.
Working fine, thanks!!!!
Post a Comment