Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datareader attach to a text box in datalist.. 1

Status
Not open for further replies.

1Data

MIS
Sep 30, 2005
66
US
I need to attach a datareader column to a datalist text box...

Dim dp As SqlDataReader = SQL_Data_admin.GetVol_LookUp_admin(Session("ssn"), txtlname.Text, Session("User_org"))

dp.Read()

...Here i need to Attach my return to textbox in a datalist..specific data..

like ssn, address, fname, lname, phone number. to a datalist text box's.

I have some HTML code that calls a container..will it still work if I use the .Read without Binding them? I am a bit confused as you can tell...any suggestions would be appreciated. thanks in advance..
 
Basically you'd want to have an IDBCommand/DBCommand (like SqlCommand) retrieve all your data, then say:

Code:
myDataList.DataSource = myDataReader;
myDataList.DataBind();

//close database connection

The DataList will handle the details of binding for you, you'd just manipulate the templates so you use DataBinder.Eval to assign values to the Text property of the TextBoxes:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top