ASP.NET Web Server Controls

J

Jamie Fallon

I don't understand how to use the ASP.NET Web Server Controls to do the
following. I know how to do this in standard ASP, but don't understand how
..Net wants us to do it.
I want to use one query to the database to get to get a list of people and
the pictures that are stored for that person.

So I have the dataset:
Jamie pic1
Jamie pic2
Jamie pic3
Jamie pic4
Julie pic1
Julie pic2

using the Web Server Controls, I want a table with 2 rows (each with a
variable amount of columns.) I don't want to have to make more than one
query to the database.

Jamie pic1 pic2 pic3 pic4
Julie pic1 pic2
 
J

jamie.fallon

My question is more about seperating the data, not about how to show
images. How do you tell the data control to move the 2nd person to the
next row. How do you tell the control that all the data for the first
person belongs in one row and when you get to change in person, that
its a new row?
 
J

jamie.fallon

My question is more about seperating the data, not about how to show
images. How do you tell the data control to move the 2nd person to the
next row. How do you tell the control that all the data for the first
person belongs in one row and when you get to change in person, that
its a new row?
 
T

Teemu Keiski

Hi,

Note that I just corrected a technical aspect on that reply. :)

taking this in light of your scenario, it would take at least filtering with
your DataSet, unless you modify it so that your query returns two
resultsets, the distinct persons, and then images so thatb you can filter
images out (while databinding to the distinct persons). It would be possible
within a stored procedure.

What you probably look for is master-detail control setup. Say that you have
a DataGrid to which you bind the persons and on datagrid's templatecolumn,
you have a DataList control to which you bind the images of that specific
person.

Here is a sample of master-detail:
http://www.daveandal.net/books/6744/grids/masterdetail.aspx (note that you
certainly can control with dataList if repeating happens horizontally or
vertically)

Here is another sample
http://aspnet.4guysfromrolla.com/articles/040203-1.aspx
 
A

albert braun

Thanks for the correction Teemu. I learned about that feature from
Esposito's "Introducing ASP.NET 2.0".

Sorry, Jamie, for the bad guidance.

Teemu, do you know of a list of other features that have been dropped?
Thanks.

Regards,
albert
 
A

albert braun

Teemu, never mind, I now see the link in your earlier reply. I'm just
not awake this morning.

Thanks again,
albert
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top