paste to password

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,
i have a textbox that used for entering password (passwordChar=*)
when im doing cut,copy,paste to the textbox.text its not working
how to do the paste in this case?
thanks
 
s-galit said:
i have a textbox that used for entering password (passwordChar=*)
when im doing cut,copy,paste to the textbox.text its not working
how to do the paste in this case?

I just tried this (added a new System.Windows.Forms.TextBox to a form and
set its PasswordChar property to '*') and when I attempt to cut or copy
from it (Ctrl-X and Ctrl-C, respectively), a tooltip is displayed that
reads that I cannot copy text from a password field. The cut and copy
context menu (right-click) items are disabled. This is what I'd expect.

Pasting, on the other hand, works fine.

Can you explain what happens when you try, and how this doesn't meet your
expectations of what should happen?
 
so you are saying that there is no way to do copy & cut to the password?
by the way the paste is working now
thank you for the help
 
s-galit said:
so you are saying that there is no way to do copy & cut to the
password?

It sounds like you're not wanting to do copy and cut *to* the password,
but *from* the password. This shouldn't be allowed for security
reasons.
 
s-galit said:
so you are saying that there is no way to do copy & cut to the password?

Windows prevents it, and that seems logical to me -- imagine if an
application which remembers your password enabled copying from the password
text box. Someone else using your computer could then copy and paste your
password into Notepad, for example, and they'd see your password in clear
text.
 
right... :) thanks

C# Learner said:
Windows prevents it, and that seems logical to me -- imagine if an
application which remembers your password enabled copying from the password
text box. Someone else using your computer could then copy and paste your
password into Notepad, for example, and they'd see your password in clear
text.
 
Back
Top