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? 3 5036
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
"Tillman Erb" wrote: 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?
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
"R. Thomas [Xtreme.Net]" wrote: 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
"Tillman Erb" wrote:
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?
Yes, Array object would be one of the choices.
R. Thomas
"Tillman Erb" wrote: 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
"R. Thomas [Xtreme.Net]" wrote:
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
"Tillman Erb" wrote:
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?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mal P |
last post by:
Hi there,
I'm a J2EE fellow who (as usual) has been thrown in the deep end and
have to learn a fair chunk of the .NET platform (VS, ADO, WebForms, C#
etc) in roughly two days. I'm doing ok so...
|
by: Hardy Wang |
last post by:
Hi all;
I have a DataList with ItemCreated event like below:
private void myList_ItemCreated(object sender , DataListItemEventArgs e) {
DataRowView myRowView;
DataRow myRow;
if (e.Item.DataItem...
|
by: Thanh |
last post by:
I created an ASP.NET project and dropped a DataList on
the web form. I then wrote a simple class to return data:
namespace Playing
{
public class PositionData
{
private string name;
private...
|
by: jenn |
last post by:
Hi
Anyone knows how to access to a value of a row in a datalist. Something like this in datagrid
Dim str = MyDataGrid.Cell(0).tex
I would like something like this
Dim str =...
|
by: Joe Van Meer |
last post by:
Hi,
Is the datalist meant for one table or can I use it to display information
from 2 different tables? Or should I be looking at a datagrid instead?
I began my code and kinda ran into a snag...
| |
by: Lerp |
last post by:
I have a dataset that is made up of info from 2 tables. I have created a
relationship between these 2 and have added it to the dataset.
My datalist is working perfectly minus one little problem,...
|
by: Bharat |
last post by:
Hi Folks,
Suppose I have two link button on a page (say lnkBtn1 and
lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically
created control. And On the click event of the lnkBtn2 I...
|
by: CVerma |
last post by:
Hi,
I have an embedded datagrid within a datalist. I am not able to
perfrom paging in the datagrid. Any ideas? Here is my code:
Here is my Simplegrid.cs file:
using System;
using...
|
by: mroffey |
last post by:
Hi everyone,
I've been having this problem and I've searched high and low, but I
can't seem to find the answer to what is probably a very simple
solution.
In a nutshell, I have a nested...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |