Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Windows WPF VB.NET
Hi all
I am using PasswordBox for entering the password..but while entering into database its giving me error in below lines
 txtAdminPass.Text = dt.Rows(0)("AdminPass").ToString()
 txtAdminConfirmPass.Text = dt.Rows(0)("AdminConfirmPass").ToString()
it's telling Text property is not associated with PasswordBox
Please tell me how to do this..or else is there any way to make the textbox as a password box
Thank you
Posted 9-May-13 3:06am
Edited 9-May-13 3:57am
ThePhantomUpvoter at 9-May-13 8:41am
If you had read the documentation for the PasswordBox, you would have known that the property that you wanted was the Password property not the Text property.
Code-Hunt at 9-May-13 8:57am
i know that..but then is it now possible to enter the value of password box to database...??
ThePhantomUpvoter at 9-May-13 9:24am
That wasn't your question now was it? If you knew that then why did you ask? What is the problem with your database? Can you not write a connection string? Do you not know how to connect to whatever database you are using? Did you do any research at all? Can you not write an INSERT or UPDATE statement? Do you not know how to executee a SQL statement?
Code-Hunt at 9-May-13 9:27am
try to read before asking this much questions...all others are clear about the question apart from you
pdoxtader at 9-May-13 9:58am
He's asking where your stuck - what it is you're having trouble with. Be specific. We'll give you code examples if we know what your having trouble with... but we're not going to write your application for you.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hi Code-Hunt,
I believe you have selected the text property instead of "Password" property
Try this line
txtAdminPass.Password = dt.Rows(0)("AdminPass").ToString()
txtAdminConfirmPass.Password = dt.Rows(0)("AdminConfirmPass").ToString()
It would help you to resolve the issue.
CPallini at 9-May-13 8:49am
I guess you are right: 5.
rk_prabakar at 9-May-13 8:51am
Thanks Pal....
Code-Hunt at 9-May-13 8:56am
@rk_prabakar: No thats not the case..i may be pasted this by mistake..i just want to know to save the data of passwordbox as it dont have text property
pdoxtader at 9-May-13 8:58am
ThePantomUpvoter told you... no? He said that the property you needed was the Password property, not the Text property. Have you tried that out? He also wrote that you should have read the documentation for PasswordBox... and while I don't necessarily agree with beating people up for asking questions... he's right.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

PasswordBox.Password did the work for me...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 495
1 OriginalGriff 400
2 Sergey Alexandrovich Kryukov 394
3 CHill60 320
4 Sascha Lefévre 269
0 Sergey Alexandrovich Kryukov 10,017
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100