Click here to Skip to main content
15,892,797 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I want to check whether user exists, if exists then user password should be retrieved to textbox2, I am using BLL to check whether user exists or not.

VB
Protected Sub button1_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim productslogic As New productsBLL()
        Dim anil As DataSet1.asaaDataTable = productslogic.GetDataByname(TextBox1.Text)
TextBox2.Attributes.Add("value", productslogic.GetDataByname(TextBox1.Text))


When using this code, I am getting following error: ERROR:Value of type 'DataSet1.asaaDataTable' cannot be converted to 'String'. If I am converting this to string then I am using this code:

VB
Protected

Sub button1_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim productslogic As New productsBLL()

Dim anil As DataSet1.asaaDataTable = productslogic.GetDataByname(TextBox1.Text)

 TextBox2.Attributes.Add("value", productslogic.GetDataByname(TextBox1.Text).ToString)


This is executing properly but in textbox2 I am getting the data table name: asaa (asaa is my datatable) but I want the user password into the textbox. In my BLL productslogic.GetDataByname(TextBox1.Text) the code I am using is:

select password from asaa where name=@name


Any help from your side? Thank you!
Posted
Updated 14-May-10 22:34pm
v4

The very reason to code this thing is wrong. Whats the point of having a login-password if you set the passowrd yourself (somehow!)..

If you want to do something like that than remove login/password as they are steps of securing a site and individual preferences - giving them privacy and security.

Design or think another way to what you are planning to do.
 
Share this answer
 
Stop asking the same question. You have been told before not to do this and you cannot set the text of password textbox. Any further questions on this subject will be removed.
 
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