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 5039
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 far, but am wondering on a
better way to do something...
Basically, I have a form which has a few fields the user fills in.
When submitted, the...
|
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 != null) {
Trace.Write(e.Item.ItemType.ToString(), "---with data");
} else {
Trace.Write(e.Item.ItemType.ToString(), "---without data");
}
|
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 string ticker;
|
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 = DataBinder.Eval(MyDatalist.Items(count).DataItem, "customerId")
but it doesn't work.
|
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 where my last two columns I am
displaying are ID fields, one for clientid and the other for empid.
What I would really like is to display their...
| |
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, the very last
field in my itemtemplate is an ID field from the child table. I would like
to display the Name of the company as opposed to the ID. ...
|
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 have to add a
datalist control.
Using this datalist control I should be able to add edit, modify
and cancel the items listed in this control.
...
|
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 System.Collections;
using System.ComponentModel;
using System.Data;
|
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 datalist, Parent and Child. In the child
datalist, I need to get 1 of the values from the parent datalist. I've
included the dataaccess code below, only...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |