Question

  Asked: Jul 29 2007   7:29 AM GMT
  Asked by: drsingh


programming using c#,winforms and visual studio.


Programming Languages, ASP, ASP.NET, C, ColdFusion, HTML, J#, J2EE, Java, JavaScript, JSP, SQL, VB.NET, VBScript, Visual Basic, XML, Web development tools, Dreamweaver, Macromedia Flash, Photoshop, DataCenter, Web site design & management

i cant think of what to write in this part of the code so that the password character is " * " when the user enters his/her password.pliz help

private void txtPassword_TextChanged(object sender, EventArgs e)
{
char Password =GetStyle ("*");
txtPassword.Focus();
}

i just have no idea what to write so that this particular code would work.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



If you just want to make the textbox show asterisks (*) in the textbox so that the text is hidden when the user types, set the PasswordChar property to *.
That works in all versions of .net framework, and can be done in code or in the winforms designer

the code behind this approach is:

this.textBox1.Name = "textBox1";
this.textBox1.PasswordChar = '*';
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development and DataCenter.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register