Display multiple record in 1 page
-
Hi, I want to create a web page which will display multiple record (can be one or many). I want the record to be display like this: Record 1: Name : Alex Age : 23 Address : xxxxxxxxxxx Other : (Datagrid display data here) Record 2: Name: Alice (No datagrid display data here coz no data for this person in database) Record 3: Name: Alicia Age:24 Other : (Datagrid display data here) Notice that Name will be display in every record. If no data for age and address, then no need to display. My question is how to dynamically display data like above eventhought the number of record is not fix. How do i repeat to use the control? :confused:
-
Hi, I want to create a web page which will display multiple record (can be one or many). I want the record to be display like this: Record 1: Name : Alex Age : 23 Address : xxxxxxxxxxx Other : (Datagrid display data here) Record 2: Name: Alice (No datagrid display data here coz no data for this person in database) Record 3: Name: Alicia Age:24 Other : (Datagrid display data here) Notice that Name will be display in every record. If no data for age and address, then no need to display. My question is how to dynamically display data like above eventhought the number of record is not fix. How do i repeat to use the control? :confused:
Since this is the ASP.NET forum, here's an ASP.NET-related response. First, be sure to read the ASP.NET documentation in the .NET Framework SDK - you can't read far without seeing something about data-bound controls. Specifically, look at the
DataList
andDataGrid
controls (using a templated column in the case of the latter). Because they are data-bound controls, you can pass them aDataSet
,DataTable
, or any otherIEnumerable
(orIListSource
). You specify the template - they provide the repetition and, if you like, the paging for multi-page results (as well as editing capabilities).-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----