By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,686 Members | 1,914 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,686 IT Pros & Developers. It's quick & easy.

onKeyPress - replace text

P: 55
I have the following controls

<asp:TextBox ID="Password" runat="server" TextMode="SingleLine" Text="Password" >
</asp:TextBox>

<asp:HiddenField ID="uxHiddenPassword" runat="server" />

The initial value of the text box says "PASSWORD" because i have no labels on the page

however, when someone starts typing a password, i want to **** out this password
I pressume once i star it out, then this actually changes the value (its a registration form so i need to preserve their password to use for registering)
i.e. if i * it out, i dont want their password to be a bunch of stars, so i figure i have to record this in a hidden field and use that value when doing registering?

so points go to the person to who gives me the javascript that can do this

i.e. on keypress updated hidden field then replace textbox value with *
Thanks
Anes P.A
Mar 16 '11 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
usually you use an input field of the password type for that (donít know which ASP controls are used for that).
Mar 16 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.