Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Writing text to a password control

Writing text to a password control

Scheduled Pinned Locked Moved ASP.NET
helpdesignsysadminsecurity
5 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel Peters
    wrote on last edited by
    #1

    Hello, can anyone help me with the following issue: when using a server side control, type=textbox, textmode=password, i cannot write any values to the box from the codebehind page. The box is just a regular control: However, setting TextBox1.Text doesn't fill the box. Maybe this behaviour is by-design security related, but at least filling the box with a line of ****** to indicate a password was enterd would be nice! Thanks, Dan

    M D 2 Replies Last reply
    0
    • D Daniel Peters

      Hello, can anyone help me with the following issue: when using a server side control, type=textbox, textmode=password, i cannot write any values to the box from the codebehind page. The box is just a regular control: However, setting TextBox1.Text doesn't fill the box. Maybe this behaviour is by-design security related, but at least filling the box with a line of ****** to indicate a password was enterd would be nice! Thanks, Dan

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      That shouldn't be problem.Where/How do you write this code? Mazy "And the carpet needs a haircut, and the spotlight looks like a prison break And the telephone's out of cigarettes, and the balcony is on the make And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits

      1 Reply Last reply
      0
      • D Daniel Peters

        Hello, can anyone help me with the following issue: when using a server side control, type=textbox, textmode=password, i cannot write any values to the box from the codebehind page. The box is just a regular control: However, setting TextBox1.Text doesn't fill the box. Maybe this behaviour is by-design security related, but at least filling the box with a line of ****** to indicate a password was enterd would be nice! Thanks, Dan

        D Offline
        D Offline
        Dan_P
        wrote on last edited by
        #3

        Yeah it's a bit of a pain. txtPasswordTextBox.Attributes.Add("value", "PasswordValue"); I Think it's been built this way for security reasons.

        D S 2 Replies Last reply
        0
        • D Dan_P

          Yeah it's a bit of a pain. txtPasswordTextBox.Attributes.Add("value", "PasswordValue"); I Think it's been built this way for security reasons.

          D Offline
          D Offline
          Daniel Peters
          wrote on last edited by
          #4

          Thanks! That works great. I guess you're right about security, I assumed the same. Daniel

          1 Reply Last reply
          0
          • D Dan_P

            Yeah it's a bit of a pain. txtPasswordTextBox.Attributes.Add("value", "PasswordValue"); I Think it's been built this way for security reasons.

            S Offline
            S Offline
            Steve van Niman
            wrote on last edited by
            #5

            Thanks - rookie stumped by the same behavior. Worked like a charm.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups