Results 1 to 4 of 4

Thread: Asp textbox

  1. #1
    Join Date
    Apr 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Asp textbox

    How can I display text in the textbox in a password format?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    <%
    Dim d
    d = "This is the value"
    %>
    <form name="form1">
    <input type="password" value="<%=d%>">
    </form>

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •