Best practice for showing data from diferent queries in same form

C

Corobori

I need to make something like this:

http://www.corobori.com/sos/picDemartti.jpg

That is the 1st time I am doing like this in ASP.NET (did it tons of
times in "old" ASP) so I would like to do it the "right way" from the
beginning.

Data to populate 1A and 1B are from one query, 2A and 2B from another
and 3A and 3B from a 3rd query. Each of them will be clickable with a
popup window showing a larger pic and more text.

It is not a list with paging or sorting. I just need to show 6 shoes. I
need to randomly select 2 children's shoes for the left column; 2
women's shoes for the central column and 2 men's shoes for the 3rd
column

So, what's the best to do this ?

Jean-Luc
 
G

garethdjames

How big are the datasets?

Can you cache them in memory as datatables then do a random selection?
 
L

Lucas Tam

It is not a list with paging or sorting. I just need to show 6 shoes. I
need to randomly select 2 children's shoes for the left column; 2
women's shoes for the central column and 2 men's shoes for the 3rd
column

So, what's the best to do this ?

I would use a multi-statement random select and place it into a single
dataset.

On output, I would output the datagrid.
 
C

Corobori

But how can I say that records 1 and 2 should got into 1st col 1st and
2nd row; records 3 and 4 in 2nd col 1st and 2nd row; records 5 and 6
in 3rd col 1st and 2nd row ?
 
C

Corobori

Here is how I did it:

1) I created a UserControl representing one cell including a repeater
and I bind it to the db with a parameter for selection

2) I created a form with 3 labels as a place holder. Then I added the
following code:
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim tempUserControl = Page.LoadControl("Cell.ascx")
tempUserControl.DisplayDataType = "1"
cel1.Controls.Add(tempUserControl)

tempUserControl = Page.LoadControl("Cell.ascx")
tempUserControl.DisplayDataType = "2"
cel2.Controls.Add(tempUserControl)

tempUserControl = Page.LoadControl("Cell.ascx")
tempUserControl.DisplayDataType = "3"
cel3.Controls.Add(tempUserControl)

tempUserControl = Nothing
End Sub

My reference is
http://www.dotnetjunkies.com/Tutorial/E53AEE62-AB4B-4BDC-9753-3D59AF776E21.dcik

What do you think ?

Jean-Luc
http://www.corobori.com
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top