Click here to Skip to main content
15,886,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am making a pasword field in my windows form and i am making a login form so i neend a password field which may be textbox. But i dont want user to show the text plainly i want it as asterisk. I heard about masked textbox but i dont know how to implement it. As it contains restricted data. Means. Int or char. I want my textbox to show asterisk * when a number is pressed or alphabet is pressed. How can i achive this.
Thanks in advance
am new to programming learning.net
Posted
Comments
Innocent910 28-Sep-13 2:59am    
the password char property should be written as *.... so when you enter text in specific field it shows asterick

Set the PasswordChar value of your text box to be *

Password field should in the star form in C#[^]
 
Share this answer
 
Comments
sariqkhan 28-Sep-12 13:30pm    
thanx thanx
:)
Right Click the textbox and click properties. In that u will be having UseSystemPassword option change into true.It will change into asterisk....
 
Share this answer
 
Comments
sariqkhan 28-Sep-12 13:30pm    
thanx thanx
:)
Freind, Please use "PasswordChar" property and assign the value "*"

Thanks,
Ambesha
 
Share this answer
 
Comments
sariqkhan 28-Sep-12 13:30pm    
thanx thanx
:)

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