I have designed a page where user can write messages and send within a group but i want that if they enter any special character like <>?#@ etc a msg should be displayed irrespective of the crashing of the page.
Can anyone help me out???
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
for that you have to use javaScript validation or any server site validation
for javaScript
function validate(inputText)
{
if(inputText.match(/[<>]/))
return false;
}
function TextBoxValidate()
{
var txt1=document.getElementById(TextBoxId).value;
if(!(validate(inputText)))
{
alert(“incorrect text”)
return false;
}
else
return true;
}
call these function in that text box where you want to validate by using onClientClick=”return TextBoxValidate();”