Problems Setting the TextBox.Text Property

Discussion in 'ASP .Net' started by Tom Dacon, Nov 8, 2004.

  1. Tom Dacon

    Tom Dacon Guest

    Exactly what problems are you having?

    Tom Dacon
    Dacon Software Consulting

    "David Kyle" <> wrote in message
    news:e$%...
    > Hello there,
    > I'm having some problems setting the TextBox.Text Property in my code and
    > having it returned to the client in the source when the
    > TextBox.TextMode="Password".
    >
    > I know this is generally not a good idea to fill it with the actual
    > password but I would like to put '*'s in it as place holders just so it
    > looks like the password is actually typed out in there.
    >
    > Thanks,
    >
    > David Kyle
    > www.chloemag.com
    >
    >
    Tom Dacon, Nov 8, 2004
    #1
    1. Advertising

  2. Tom Dacon

    David Kyle Guest

    Hello there,
    I'm having some problems setting the TextBox.Text Property in my code and
    having it returned to the client in the source when the
    TextBox.TextMode="Password".

    I know this is generally not a good idea to fill it with the actual password
    but I would like to put '*'s in it as place holders just so it looks like
    the password is actually typed out in there.

    Thanks,

    David Kyle
    www.chloemag.com
    David Kyle, Nov 8, 2004
    #2
    1. Advertising

  3. Tom Dacon

    David Kyle Guest

    lol, can't believe I didnt' actually say what the problem was. Absent
    minded after 3 days 16 hours a day programing i guess.

    anyways, basically the problem is when I assign a value to the TextBox.Text
    property it doesn't send that information back to the client in the source.

    eg.
    OnPageLoad() {
    txtPassword.Text = "123456";
    }

    <asp:textbox id="txtPassword" textmode="Password" runat="server" />

    returned source:
    <input name="txtPassword" type="password" id="txtPassword" />

    There's no value="123456" in the input tag that is sent to the client.

    I think this explains it.

    thanks for any help.

    Dave
    "Tom Dacon" <> wrote in message
    news:...
    > Exactly what problems are you having?
    >
    > Tom Dacon
    > Dacon Software Consulting
    >
    > "David Kyle" <> wrote in message
    > news:e$%...
    >> Hello there,
    >> I'm having some problems setting the TextBox.Text Property in my code and
    >> having it returned to the client in the source when the
    >> TextBox.TextMode="Password".
    >>
    >> I know this is generally not a good idea to fill it with the actual
    >> password but I would like to put '*'s in it as place holders just so it
    >> looks like the password is actually typed out in there.
    >>
    >> Thanks,
    >>
    >> David Kyle
    >> www.chloemag.com
    >>
    >>

    >
    >
    David Kyle, Nov 8, 2004
    #3
  4. Tom Dacon

    Michael Guest

    PasswordField.Attributes.Add("value", "secret")

    Here's a link..

    http://www.devx.com/vb2themax/Tip/18887



    "David Kyle" <> wrote in message
    news:e$%...
    > Hello there,
    > I'm having some problems setting the TextBox.Text Property in my code and
    > having it returned to the client in the source when the
    > TextBox.TextMode="Password".
    >
    > I know this is generally not a good idea to fill it with the actual

    password
    > but I would like to put '*'s in it as place holders just so it looks like
    > the password is actually typed out in there.
    >
    > Thanks,
    >
    > David Kyle
    > www.chloemag.com
    >
    >
    Michael, Nov 9, 2004
    #4
  5. Tom Dacon

    David Kyle Guest

    Thanks Michael! it works great now!


    "Michael" <xxx.xxx.xxx> wrote in message
    news:%23AoG$...
    > PasswordField.Attributes.Add("value", "secret")
    >
    > Here's a link..
    >
    > http://www.devx.com/vb2themax/Tip/18887
    >
    >
    >
    > "David Kyle" <> wrote in message
    > news:e$%...
    >> Hello there,
    >> I'm having some problems setting the TextBox.Text Property in my code and
    >> having it returned to the client in the source when the
    >> TextBox.TextMode="Password".
    >>
    >> I know this is generally not a good idea to fill it with the actual

    > password
    >> but I would like to put '*'s in it as place holders just so it looks like
    >> the password is actually typed out in there.
    >>
    >> Thanks,
    >>
    >> David Kyle
    >> www.chloemag.com
    >>
    >>

    >
    >
    David Kyle, Nov 10, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gill Smith
    Replies:
    4
    Views:
    8,854
    Gish Smith
    May 22, 2004
  2. kevin  cline
    Replies:
    2
    Views:
    2,388
    Gilbert Rebhan
    Jul 26, 2008
  3. Nathan Sokalski
    Replies:
    25
    Views:
    1,410
    Nathan Sokalski
    Mar 4, 2010
  4. kalaiselvan
    Replies:
    1
    Views:
    184
    Ken Cox [Microsoft MVP]
    Aug 8, 2003
  5. Jurjen de Groot
    Replies:
    0
    Views:
    297
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page