Click here to Skip to main content
15,883,990 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all

I am using PasswordBox for entering the password..but while entering into database its giving me error in below lines

VB
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
Updated 9-May-13 2:57am
v2
Comments
[no name] 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.
[no name] 9-May-13 8:57am    
i know that..but then is it now possible to enter the value of password box to database...??
[no name] 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?
[no name] 9-May-13 9:27am    
try to read before asking this much questions...all others are clear about the question apart from you
pdoxtader 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.

Hi Code-Hunt,

I believe you have selected the text property instead of "Password" property

Try this line

VB
txtAdminPass.Password = dt.Rows(0)("AdminPass").ToString()
txtAdminConfirmPass.Password = dt.Rows(0)("AdminConfirmPass").ToString()

It would help you to resolve the issue.

Regards,
RK
 
Share this answer
 
v2
Comments
CPallini 9-May-13 8:49am    
I guess you are right: 5.
♥…ЯҠ…♥ 9-May-13 8:51am    
Thanks Pal....
[no name] 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 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.
PasswordBox.Password did the work for me...
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900