Hi,
I have a radcombobox with OnClientKeyPressing event.User should not enter any special characters.How can i block this.I have used "OnClientKeyPressing " for validating for special characters.This is the JavaScript code
function OnClientKeyPressing() {
var evtobj = window.event ? event : e
if ((evtobj.shiftKey) && ((evtobj.keyCode == 188) || (evtobj.keyCode == 190))) {
alert("Special characters not allowed");
evtobj.keyCode = 0;
evtobj.returnValue = false;
return false;
}
}
Eg:-If the user type "vis<" then "<" it should remove.The value should be "vis" instead of "vis<".Now i am getting value as "vis<" and alert is showing.How can i avoid this and data should come starting with "vis"
I have a radcombobox with OnClientKeyPressing event.User should not enter any special characters.How can i block this.I have used "OnClientKeyPressing " for validating for special characters.This is the JavaScript code
function OnClientKeyPressing() {
var evtobj = window.event ? event : e
if ((evtobj.shiftKey) && ((evtobj.keyCode == 188) || (evtobj.keyCode == 190))) {
alert("Special characters not allowed");
evtobj.keyCode = 0;
evtobj.returnValue = false;
return false;
}
}
Eg:-If the user type "vis<" then "<" it should remove.The value should be "vis" instead of "vis<".Now i am getting value as "vis<" and alert is showing.How can i avoid this and data should come starting with "vis"