locked
set password and change password RRS feed

  • Question

  • hi. im a beginner in c#.

    my question is, how can i set password and change password in C# windows form application without using a database (since im a beginner)..?
    lets say i have:

    1- enter password textbox
    2- confirm password textbox
    3- new password textbox

    how the new password can replace the current password that user set?
    *if its possible without using a database*

    thank you.

    Wednesday, August 3, 2011 4:20 AM

Answers

  • Hello Mickey You can achieve it by adding a variable to the settings file 

    you can access it using 

    My.Settings.yourPasswordVariable 

    and reset it using 

    My.Settings.yourPasswordVariable  = NewValue;

    followed by 

    My.Settings.Save();

     

    Thanks 


    Want to add MVP with my name.
    • Proposed as answer by Carmelo La Monica Wednesday, August 3, 2011 5:53 AM
    • Marked as answer by Lie You Thursday, August 4, 2011 8:06 AM
    Wednesday, August 3, 2011 4:43 AM
  • It is not clear from your post what will be password protected.

     

    I suppose that you want to create a simple application that authenticate user on base of password just for learning purpose,s.

    You can save  your password as string in resources.

    For more details about resources see here

    http://msdn.microsoft.com/en-us/library/7k989cfy%28v=vs.80%29.aspx

    http://www.codeproject.com/KB/cs/UserSettings.aspx


    My Blogs http://earningmoneyonbux.blogspot.com/
    • Edited by Zain_Ali Wednesday, August 3, 2011 5:47 AM
    • Proposed as answer by Carmelo La Monica Wednesday, August 3, 2011 5:53 AM
    • Marked as answer by Lie You Thursday, August 4, 2011 8:06 AM
    Wednesday, August 3, 2011 4:56 AM

All replies

  • Hello Mickey You can achieve it by adding a variable to the settings file 

    you can access it using 

    My.Settings.yourPasswordVariable 

    and reset it using 

    My.Settings.yourPasswordVariable  = NewValue;

    followed by 

    My.Settings.Save();

     

    Thanks 


    Want to add MVP with my name.
    • Proposed as answer by Carmelo La Monica Wednesday, August 3, 2011 5:53 AM
    • Marked as answer by Lie You Thursday, August 4, 2011 8:06 AM
    Wednesday, August 3, 2011 4:43 AM
  • It is not clear from your post what will be password protected.

     

    I suppose that you want to create a simple application that authenticate user on base of password just for learning purpose,s.

    You can save  your password as string in resources.

    For more details about resources see here

    http://msdn.microsoft.com/en-us/library/7k989cfy%28v=vs.80%29.aspx

    http://www.codeproject.com/KB/cs/UserSettings.aspx


    My Blogs http://earningmoneyonbux.blogspot.com/
    • Edited by Zain_Ali Wednesday, August 3, 2011 5:47 AM
    • Proposed as answer by Carmelo La Monica Wednesday, August 3, 2011 5:53 AM
    • Marked as answer by Lie You Thursday, August 4, 2011 8:06 AM
    Wednesday, August 3, 2011 4:56 AM
  • thank you for replying guys!

    i think i already got the way how to do it.

    thanks for the reference!

    :)

    Wednesday, August 3, 2011 5:08 AM
  • you  are welcome.
    Best Regards,
    Rocky Yue[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 4, 2011 8:06 AM