Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello, I have textbox on my form, the details are below:


So, I want to know, how to NOT save this pretext on the textbox also? I mean only blank field and the pretext must not be saved if the user has not typed anything on the textbox.
Posted
Updated 5-May-11 13:18pm
v2

1 solution

Why not just test if the text box contains the predefined text, something like:
VB
If textbox.text = "" Or textbox.text = "Insert username here" Then
MsgBox ("Fill the username field please")
Else
Etc....
 
Share this answer
 
Comments
555336 3-Apr-11 10:36am    
lol thank you I did it before you replied lol. i used my brain :)
Wendelius 3-Apr-11 10:41am    
No problem :)

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