Probablily because you did not implement the KeyPress event as Mike Askew proposed. You have the code already perhaps you don't know how to do it?
So: click your textbox to select it. Go to the properties window and click on the square with a lightning on it. You see a list of events you can implement for a textbox. Scroll untill you find the KeyPress event. Double click. You will be redirected to your code ready to fill in your implementation of the event, namely the code given by Mike.
Hi, Ovro Habib welcome. :)
If you have a question, please don't pose it in this or other thread, but make your own thread.
But to answer your question anyway: Follow the procedure above, but instead of using a KeyPress event, use a Click event.
Next fill in this code:
TextBox TB = sender as TextBox;
TB.Text = string.Empty;
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...