IF you are making a web application then you can do it in javascript like this
function check(e) {
var keynum
var keychar
var numcheck
if (window.event)
{
keynum = e.keyCode
}
else if (e.which)
{
keynum = e.which
}
keychar = String.fromCharCode(keynum)
if (keychar == "'" || keychar == "`")
{
return false;
}
else {
return true;
}
}