Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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 28-Sep-12 2:43am
sariqkhan1.4K
Comments
Innocent910 at 28-Sep-13 2:59am
   
the password char property should be written as *.... so when you enter text in specific field it shows asterick
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Set the PasswordChar value of your text box to be *
 
Password field should in the star form in C#[^]
  Permalink  
Comments
sariqkhan at 28-Sep-12 13:30pm
   
thanx thanx :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Right Click the textbox and click properties. In that u will be having UseSystemPassword option change into true.It will change into asterisk....
  Permalink  
Comments
sariqkhan at 28-Sep-12 13:30pm
   
thanx thanx :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Freind, Please use "PasswordChar" property and assign the value "*"
 
Thanks,
Ambesha
  Permalink  
Comments
sariqkhan at 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)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 710
1 OriginalGriff 543
2 Abhinav S 318
3 thatraja 245
4 Tadit Dash 140
0 Sergey Alexandrovich Kryukov 8,322
1 OriginalGriff 4,790
2 Peter Leow 3,784
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 28 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid