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
0 Sergey Alexandrovich Kryukov 530
1 mhegazy94 460
2 Ravi Bhavnani 230
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,205
1 OriginalGriff 6,801
2 CPallini 5,350
3 George Jonsson 3,644
4 Gihan Liyanage 2,797


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100