how to mask an input

N

niv

Hello,

I have a textbox that users enter their password into..
the problem is that i want the password to be masked with
a asterisk.

How can I do this and also still be able to read the input
like so.

string x;
x = TextBox1.Text;

I dont want x to have asterisks..
Thanks in advance ;)

niv
 
K

Ken Dopierala Jr.

Hi niv,

You are going to love this! In your <asp:textbox> tag put this:

TextMode="Password"

For example:

<asp:textbox id="txtPassword" Runat="server"
TextMode="Password"></asp:textbox>

Good luck! Ken.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top