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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Khan Abrar AhmedPosted May 6, 2014, 5:12 AM
you can set the textbox property TextMode="Password"
Praveen NPosted May 5, 2014, 3:35 AM
TextMode="Password"
Regards,
Praveen Nelge
Pawan KumarPosted May 2, 2014, 8:40 AM
Abhishek KumarPosted May 2, 2014, 7:23 AM
Set TextMode="Password" in textbox property.
Abhishek
Anupam SinghPosted May 2, 2014, 6:51 AM
selvi subramanianPosted May 2, 2014, 6:28 AM
your control name means what
Anupam SinghPosted May 2, 2014, 6:23 AM
if you are using ASP.NET text box control use :
Munesh SharmaPosted May 2, 2014, 5:50 AM
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);
Munesh SharmaPosted May 2, 2014, 5:27 AM
{
InitializeComponent();
pass_txt.passwordChar = ' * '; //without this you can also do it by text box property as passwordchar
}
For more info go on this link