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. General Programming
  3. C#
  4. Help regarding password char in textbox

Help regarding password char in textbox

Scheduled Pinned Locked Moved C#
questionhelp
7 Posts 4 Posters 0 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.
  • A Offline
    A Offline
    anu81
    wrote on last edited by
    #1

    hi all, I have set the password char for a textbox as *. and i am able to mask the password. I have a check box which prompts for showing the password. Now how can i unmask the password char so that the password is visible in the textbox? Thanks in advance.:) Regards Anuradha

    G N 2 Replies Last reply
    0
    • A anu81

      hi all, I have set the password char for a textbox as *. and i am able to mask the password. I have a check box which prompts for showing the password. Now how can i unmask the password char so that the password is visible in the textbox? Thanks in advance.:) Regards Anuradha

      G Offline
      G Offline
      gauthee
      wrote on last edited by
      #2

      You can change the textmode property of the textbox to single line again! TextBox1.TextMode="SingleLine"

      Gautham

      A 1 Reply Last reply
      0
      • G gauthee

        You can change the textmode property of the textbox to single line again! TextBox1.TextMode="SingleLine"

        Gautham

        A Offline
        A Offline
        anu81
        wrote on last edited by
        #3

        hi gautham, Thanks for the immediate response. I am using windows application in C#. There is no textmode property for textbox control in windows application. How to proceed? Thanks once again. Regards Anuradha

        A G 2 Replies Last reply
        0
        • A anu81

          hi all, I have set the password char for a textbox as *. and i am able to mask the password. I have a check box which prompts for showing the password. Now how can i unmask the password char so that the password is visible in the textbox? Thanks in advance.:) Regards Anuradha

          N Offline
          N Offline
          nikanth
          wrote on last edited by
          #4

          ;) Its just a trick... 1) Have a 2 textboxes which stores the password, one is masked and other unmasked at the same location having the same top,left,height and width. At an instance depending upon the checkbox value, only one textbox is visible if(checkbox checked true) { textboxMasked.Visibility = false; textboxUnmasked.Visibility = true; textboxUnMasked.Text = textboxMasked.Text } else { textboxMasked.Visibility = true; textboxUnmasked.Visibility = false; textboxMasked.Text = textboxunMasked.Text } In the check box unchecked event,do the above Hope this solve ur issue... please reply back if it solved ur requirement

          N.Navaneethan

          1 Reply Last reply
          0
          • A anu81

            hi gautham, Thanks for the immediate response. I am using windows application in C#. There is no textmode property for textbox control in windows application. How to proceed? Thanks once again. Regards Anuradha

            A Offline
            A Offline
            althamda
            wrote on last edited by
            #5

            Do the following textBox1.PasswordChar = '\0';

            A 1 Reply Last reply
            0
            • A anu81

              hi gautham, Thanks for the immediate response. I am using windows application in C#. There is no textmode property for textbox control in windows application. How to proceed? Thanks once again. Regards Anuradha

              G Offline
              G Offline
              gauthee
              wrote on last edited by
              #6

              TextBox.PasswordChar Property The character used to mask characters entered in a single-line TextBox control. Set the value of this property to 0 (character value) if you do not want the control to mask characters as they are typed. Equals 0 (character value) by default.

              Gautham

              1 Reply Last reply
              0
              • A althamda

                Do the following textBox1.PasswordChar = '\0';

                A Offline
                A Offline
                anu81
                wrote on last edited by
                #7

                hi, Thanks for your help.I got it working. Set the password char to \0 made to unmask my password. Thanks for the help. Regards Anuradha

                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