Click here to Skip to main content
Rate this: bad
good
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
v2
Comments
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
good
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.
 
Regards,
RK
  Permalink  
v2
Comments
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
good
Please Sign up or sign in to vote.

Solution 2

PasswordBox.Password did the work for me...
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 130
4 DamithSL 105
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2014
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