maybewecan
asked on
How to Query a database to return results to the neccessary textboxes
Good Morning All--
I am new to ASP.net and I am trying to complete my application here for work. I need some help with my query page. What I want to do is this, I have a field where the user inputs there vendor number, hits the query button, I then want it to return the name, address, state, zip that we currently have for their vendor number in our database. These values will return to the appropriate textboxes which I want to be "Read Only". I know I need to code a function in, then I need to code the query button in. Can someone help me?
If you need some more information let me know, Oh yeah I am doing this in VB.
Thanks much!
I am new to ASP.net and I am trying to complete my application here for work. I need some help with my query page. What I want to do is this, I have a field where the user inputs there vendor number, hits the query button, I then want it to return the name, address, state, zip that we currently have for their vendor number in our database. These values will return to the appropriate textboxes which I want to be "Read Only". I know I need to code a function in, then I need to code the query button in. Can someone help me?
If you need some more information let me know, Oh yeah I am doing this in VB.
Thanks much!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is not fair He didnt gave you nothing
He gave you a link to sarch for it I gave you code. This is going to be posted on support.
He gave you a link to sarch for it I gave you code. This is going to be posted on support.
ASKER
Yes, you gave me code but he gave me a better option for me to understand. Stop Whinning!!!!
ASKER
Follow this link
https://www.experts-exchange.com/questions/21222414/Passing-objects-to-another-aspx.html?query=How+to+Pass+a+variable+from+one+page+to+the+another&topics=865
He was awarded points for a link, proof you are only point hungry.
https://www.experts-exchange.com/questions/21222414/Passing-objects-to-another-aspx.html?query=How+to+Pass+a+variable+from+one+page+to+the+another&topics=865
He was awarded points for a link, proof you are only point hungry.
2. Reference the dll.
then use the sqlhelper.executereader to get the strings
Public Function traeridclubxdeporte(ByVal posicionequipo1 As Int32, ByVal iddeporte As Int32) As string()
sqlconnsirde = connbasica.connsirde()
Dim arParams(2) As SqlParameter
arParams(0) = New SqlParameter("@posicion", posicionequipo1)
arParams(1) = New SqlParameter("@iddeporte",
Dim dr As SqlDataReader = SqlHelper.ExecuteReader(sq
dr.Read()
dim res as string = new string(1){}
Dim idclubxdeporte As Int32 = dr.GetInt32(0) ' 0 position based
dr.Close()
sqlconnsirde.Close()
Return res
End Function
then in yoiur sub or method
Dim res as string() = new string{}
res= traerdeportedeprogramaespe
textbox1.text = res(0)