Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
i want to write in textbox only true or false
how can ı do that?
Posted

Yes you can but you probably need to enforce it? :-) Don't do it! This is hard to do, nearly impossible; more importantly, it will confuse your user beyond all expectations.

At the same time, the real solution is the right UI design. Use the following alternatives:

  • Use two radio buttons is the same radio group: one "False", another one "True"; they will be checked on mutually-exclusive basis;
  • Use a combo box with two list items: one "False", another one "True";
  • Same as before, but use a list box.


—SA
 
Share this answer
 
Validate the textbox text such that it shoud have only "True or False" at lostfocus() function.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900