473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

C#-> textBox1.PasswordChar

Is there a way to take a text, from a textbox & later passwordChar the text.
I'm not using a masked textbox.

I tried:

textBox1.PasswordChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't know
how to take a text THEN passwordchar it...Any code samples will be great!

please keep it simple b/c im a beginner
Nov 16 '05 #1
5 10303
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.PasswordChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotmail.com> wrote in message
news:OK**************@TK2MSFTNGP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.PasswordChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner

Nov 16 '05 #2
It did not work
"Robert Misiak" <rm*****@users.cutthispartout.sourceforge.net> wrote in
message news:hy****************@newsread1.news.pas.earthli nk.net...
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.PasswordChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotmail.com> wrote in message
news:OK**************@TK2MSFTNGP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.PasswordChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner


Nov 16 '05 #3
Wes
Hello Hareth,

I don't think the assignment:
textBox1.Text = textBox1.Text;
will work because it detects that it is the same and will not actually reset the text to the same value.

You could possibly try this:

textBox1.PasswordChar = '*'
string tmp = textBox1.Text;
textBox1.Clear();
textBox1.Text = tmp;

This seems like such a hack but I don't know of any other way right now.

HTH
Wes Haggard
http://weblogs.asp.net/whaggard/
It did not work

"Robert Misiak" <rm*****@users.cutthispartout.sourceforge.net> wrote
in message
news:hy****************@newsread1.news.pas.earthli nk.net...
You need to reset the text in the TextBox after assigning
PasswordChar:

textBox1.PasswordChar = '*';
textBox1.Text = textBox1.Text;
HTH,
Robert


Nov 16 '05 #4
doesnt work
"Robert Misiak" <rm*****@users.cutthispartout.sourceforge.net> wrote in
message news:hy****************@newsread1.news.pas.earthli nk.net...
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.PasswordChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotmail.com> wrote in message
news:OK**************@TK2MSFTNGP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.PasswordChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner


Nov 16 '05 #5
Try this:
textBox1.PasswordChar = '*';
textBox1.Refresh();

Chris Jobson

"Hareth" <ab******@hotmail.com> wrote in message
news:uo**************@TK2MSFTNGP15.phx.gbl...
doesnt work
"Robert Misiak" <rm*****@users.cutthispartout.sourceforge.net> wrote in
message news:hy****************@newsread1.news.pas.earthli nk.net...
You need to reset the text in the TextBox after assigning PasswordChar:

textBox1.PasswordChar = '*';
textBox1.Text = textBox1.Text;

HTH,
Robert
"Hareth" <ab******@hotmail.com> wrote in message
news:OK**************@TK2MSFTNGP14.phx.gbl...
Is there a way to take a text, from a textbox & later passwordChar the
text. I'm not using a masked textbox.

I tried:

textBox1.PasswordChar = '*';

but this didn't change my text. I know how to passwordchar, but I don't
know how to take a text THEN passwordchar it...Any code samples will be
great!

please keep it simple b/c im a beginner



Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rick | last post by:
In VB .Net how do I make the PasswordChar property of a Textbox work out to be that nice big round dot that we see in most system password fields? There is no special character I can see to place...
1
by: John | last post by:
I am creating an application which is password controlled on startup. I created a textbox for the user to enter the password. However, I would like to also have a menu option so the user can...
3
by: rosty | last post by:
This is taken from MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html /frlrfsystemwindowsformstextboxclasspasswordchartopic.asp) "When the PasswordChar property is...
7
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
7
by: Ryan | last post by:
I'm creating a user control that has a handful of controls on it (19 in total). One of the controls on the UC is a textbox for a user's password, so I've set the PasswordChar property to "*". I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.