View Full Version : Asp textbox
How can I display text in the textbox in a password format?
04-19-2006, 01:51 PM
I don't know asp, but if you can output the value you want, then here's how:
I'm gonna use php for my example... just replace with asp.
<input type="password" value="<?php echo $var; ?>">
That's really it. Add more to the tag if you want, like name= and such.
Also, this won't be secure or anything... it may still be able to be copied (I think some browser don't let you copy from password fields, but I don't know... never needed to)
But, you can always get the value that's there from the source code... the html will just show the parsed value FROM the asp, not the asp code... it's not secure if someone knows what they're doing.
05-03-2006, 06:25 AM
d = "This is the value"
<input type="password" value="<%=d%>">
05-03-2006, 06:40 AM
Hmm... I think I might have read your question incorrectly... slightly confusing.
If you want the asterisks instead of the characters, all you need is, as above, the type="password" attribute in your input tag.
The above would work, but it a bit above what you're asking for.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.