|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET Web Server Controlsfollowing. 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 here's an example.
Search codeproject for others http://www.codeproject.com/aspnet/ImageBinaryStream.asp Show quoteHide quote "Jamie Fallon" <jamie_32@newsgroup.nospam> wrote in message news:%23EFBs4yAGHA.1288@TK2MSFTNGP09.phx.gbl... >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 > Whichever solution you choose to slurp data out of your DB, you might
wish to consider using an ASP.NET 2.0 "DynamicImage" control to display the image. It caches the images and is supposed to improve performance. More here: http://weblogs.asp.net/despos/archive/2004/01/07/48354.aspx regards, albert DynamicImage is not included in the final release of .NET Framework v2.0,
and it was already postponed in beta 2 http://weblogs.asp.net/ShankuN/archive/2004/08/16/215487.aspx Show quoteHide quote "albert braun" <bcaguard2000-googlegro***@yahoo.com> wrote in message news:1134866008.418749.221120@o13g2000cwo.googlegroups.com... > Whichever solution you choose to slurp data out of your DB, you might > wish to consider using an ASP.NET 2.0 "DynamicImage" control to display > the image. It caches the images and is supposed to improve performance. > > > More here: http://weblogs.asp.net/despos/archive/2004/01/07/48354.aspx > > regards, > albert > 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? 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? 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 -- Show quoteHide quoteTeemu Keiski ASP.NET MVP, AspInsider Finland, EU http://blogs.aspadvice.com/joteke <jamie.fal***@gmail.com> wrote in message news:1134917859.315650.204560@z14g2000cwz.googlegroups.com... > 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? > 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 Teemu, never mind, I now see the link in your earlier reply. I'm just
not awake this morning. Thanks again, albert Thank you both for answering.
Teemu, I read the articles and they were helpful. Teemu Keiski wrote: Show quoteHide quote > 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 > > > -- > Teemu Keiski > ASP.NET MVP, AspInsider > Finland, EU > http://blogs.aspadvice.com/joteke > > > > > <jamie.fal***@gmail.com> wrote in message > news:1134917859.315650.204560@z14g2000cwz.googlegroups.com... > > 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? > >
Other interesting topics
Session Question
start ASP net from very scratch Funny Error Treeview problem, get value from selected node in another usercontrol ? asp.net 2.0 Best way to create Page_PreRender in VB.Net Custom membership provider problem Textbox Width Issue (Rendered differently for different browsers) Newbie Question - Master Page triggering validator Connection string problem asp.net 2.0 on apple clients |
|||||||||||||||||||||||