How can i make a textbox be a password box and displays star
how can i make a textbox be a password box and displays stars using asp.net
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Anupam SinghRank #643 · 3.7K reputationPosted May 2, 2014, 2:23 AM EDT
if you are using ASP.NET text box control use :
Munesh SharmaRank #174 · 13.9K reputationPosted May 2, 2014, 1:27 AM EDT
{
InitializeComponent();
pass_txt.passwordChar = ' * '; //without this you can also do it by text box property as passwordchar
}
For more info go on this link
Munesh SharmaRank #174 · 13.9K reputationPosted May 2, 2014, 1:50 AM EDT
In Order to make it work and display ***** in the TextBox, replace
txtPassword.Text = Password;
with below method. This will work
txtPassword.Attributes.Add("value", Password);
selvi subramanianRank #2,007 · 723 reputationPosted May 2, 2014, 2:28 AM EDT
your control name means what
Anupam SinghRank #643 · 3.7K reputationPosted May 2, 2014, 2:51 AM EDT
Abhishek KumarRank #510 · 4.8K reputationPosted May 2, 2014, 3:23 AM EDT
Set TextMode="Password" in textbox property.
Abhishek
Pawan KumarRank #8,839 · 215 reputationPosted May 2, 2014, 4:40 AM EDT
Praveen N104 reputationPosted May 4, 2014, 11:35 PM EDT
TextMode="Password"
Regards,
Praveen Nelge
Khan Abrar AhmedRank #778 · 3K reputationPosted May 6, 2014, 1:12 AM EDT
you can set the textbox property TextMode="Password"