Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I have created a web phone project. When I log in then I get a new window with logout button. My login window has two textboxes. When I log out then I get the login window but the previous information is present in that text box.

How can I get the clear text boxes after logout click in my project?
Posted
Updated 14-Jun-10 2:22am
v2
Comments
Moak 14-Jun-10 8:23am    
Updated subject, tags and copy-edited your question. Hope this is what you are looking for.

If your login form verifies the user and password then simply set myUserIDTextBox.Text = ""; etc after verification but before closing/hiding the login form.

If the login form simply passes the UserID and Password to the main form for verification then store the information in private members, set the textboxes = "", and then pass the information to the main form using the private members.

To put it simply, before leaving the login form, make sure that the content of the textboxes is no longer required and clear them then.
 
Share this answer
 
Comments
Nish Nishant 13-Jul-10 11:12am    
Reason for my vote of 5
Worth 5!
On is answer, Henry wrote myUserIDTextBox.Text = "";
That's is right if you are using C++/clr (i.e. managed C++). If you are writing your application as native you can write myUserIDTextBox.SetWindowText(_T(""));
 
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