How can I store DataList DataItem values to Session variable?

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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
 
Back
Top