======================================
<script language="javascript" type="text/javascript">
function CheckKeyCode(e)
{
if (navigator.appName == "Microsoft Internet Explorer")
{
if((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode == 8))
{
return true;
}
else
{
return false;
}
}
else
{
if ((e.charCode >= 48 && e.charCode <= 57) || (e.charCode == 0))
{
return true;
}
else
{
return false;
}
}
}
</script>
// Add this code in your GridView control's RowDataBound Event.
((TextBox)e.Row.FindControl("txtDispOrder")).Attributes.Add("onkeypress", "javascript:return CheckKeyCode(event);");
0 comments:
Post a Comment