in that textbox1 i want to restrict the user dont allow to type any thing on the textbox1.
if the user types in the textbox1 do not allow anything numbers,characters and special characters and symbols etc.
this is my question.
send the code.
REGARDS,
RAO
Satyapriya NayakPosted Dec 5, 2012, 7:25 AM
sudharsan sPosted Jul 11, 2012, 10:40 AM
oh. Sorry, i didnt look your answer. so only i posted that again.
Satyapriya NayakPosted Jul 11, 2012, 8:43 AM
I have already gave the answer that you have posted in the below link
http://www.c-sharpcorner.com/Forums/Thread/178850/validation-in-textbox.aspx
This user is not accepting anybody's answer and creating new thread of the same question rather discussing with the same thread.
Thanks
sudharsan sPosted Jul 11, 2012, 8:21 AM
refid.ReadOnly=true;
refid is that textbox id, change into your textbox id.
Satyapriya NayakPosted Jul 11, 2012, 8:07 AM
Thanks
Satyapriya NayakPosted Jul 11, 2012, 5:56 AM
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text.Length > 0)
{
MessageBox.Show("Do not allow anything numbers,characters and special characters and symbols etc.");
}
textBox1.Text = "";
}
Thanks