views:

124

answers:

2

When I look at gmail on my mobile web browser the password textbox hashes the characters as I type so I can see the actual input as I type before is hashed with an asterisk.

So as I enter it becomes, P --> *a --> **s etc..

How is this done? I presume its javascript? If somone can point me in the right direction that would be great.

A: 

This is not asp.net nor a function of gmail.

this is a behavior enabled by your phone's OS.

Sky Sanders
Thanks for the clarification. I wanted to use something similar on a ASP.NEt web form. Oh well.
SimonNet
A: 

Rather than use an asp.net control, you can do something like this (DISCLAIMER: I don't know how secure this is--I have doubts about handling passwords in unprotected strings; see below...):

Include this markup in the html section:

<input type="password" id="myPass" name="myPass"/>

And do this in the code behind:

string password = Request.Form["myPass"];  // now an insecure password string.

However, you might want to use a safer string class (eg SecureString) to handle passwords--though I am not sure how useful that would be once it's already been stored in the clear in the Request.Form object.

Kimball Robinson