Hi, for validate only you can enter alpha numeric then
add attribute on textbox
txtBox.attributes.add("onkeypress", "javascript:return isAlphaNumeric(event);");
JS function
function isAlphaNumeric(e)
{
if ((e.which < 48 || e.which > 57))
{
if ((e.which < 123 && e.which > 96))
{
return true;
}
if ((e.which < 91 && e.which > 64))
{
return true;
}
if (e.which == 8 || e.which == 0 || e.which == 32)
{
return true;
}
else
{
return false;
}
}
}