How can I store DataList DataItem values to Session variable?

G

Guest

Let's assume a database with a parent table and a child table in a
one-to-many relationship, respectively. I have a DataList control on page P
that displays values from the parent table. Each row (rP) in the DataList
control has a link that takes the user to page C, where they can view the
records in the child table corresponding to the selected row rP. Page C needs
to repeat the values from rP at the top.

Since I have already retreived the values from rP, how can I bind them on
page C without making another trip to the database server? I'm assuming
there's a way to capture the values from rP to a session variable for use on
page C, but how?

Any pointers?
 
G

Guest

In this case, you can store the values in a session or cookie, but also do
take a look at query strings, if its just few pieces of data you need to
pass...
Hth..
R. Thomas
 
G

Guest

Thanks Thomas,

Are you suggesting storing them to the session in an array object? Is there
some way I could just grab the DataItem or DataRow from the DataList?

I had considered a query string, but one of the row values could be a very
long text string.

~ Tillman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top