Binding the Password (I know)

2 posts, 0 answers
  1. Heiko
    Heiko avatar
    18 posts
    Member since:
    Nov 2013

    Posted 27 Mar 2017 Link to this post

    Hi Telerik,

    I know binding the password should not be done due to the password being in the RAM is bad practice.

    Now everything I want is to let the database tell me if there even is a password (I'm NOT loading the password/password hash) so I can set the Variable I was planning on binding to some garbage text (eg. ********) so the user is visually informed there has been a password set before.

    What is a way I can archive this?

    BTW: What is best practice to use/get the actual password the user entered to store it? Your examples and documentation on this topic are - as often - paper thin.

    Thanks a lot

  2. Kalin
    Kalin avatar
    1312 posts

    Posted 29 Mar 2017 Link to this post

    Hello Rolf,

    You can bind to the Text property of the control - it will always contain the visible chars (not the actual password). You can always get the current password as string by using the Password property, or alternately you could get the password as SecureString by using the SecurePassword property.

    Hope this helps.

    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top