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.
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:
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!