1. Make sure values are sorted by country
2. You can use a repeater or a custom solution. Either way, the header is
conditional, based on the address country.

Assuming a code behind only solution:

// dr = datareader
// workingCountry a stored value

do
{
if (workingCountry != dr["Country'])
{
// output header row here

// set workingCountry to current value
workingCountry = dr["Country"];
}

// output address row here

} while (dr.Read()); // may have to do this a bit differently for cases
where dr will be empty


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"Damien" <dij0674@hotmail.com> wrote in message
news:191d8d3f.0307310432.5ffcb38b@posting.google.c om...
> Hi All,
>
> I'm a newbie to asp.net. I've searched for an example of my situation
> in the groups, and haven't found anything. So I'm seeking your expert
> advice. Here's the info.
>
> I'm pulling data from a sql 2000 db table that contains information
> about buildings like address, city, county, state, and region of the
> country (USA).
>
> I need to display the addresses of the buildings by the county they
> are located in. I'm using codebehind (vb.net) to request.querystring
> for the regnid to set the page to the proper region on load.
>
> I can't figure out how to get the addresses of all the buildings in a
> particular county with the county at the top of the list. The county
> info is a column value in the row of each table.
>
> i.e.
>
> Some county
>
> Building 1
> Building 2
> Building 3
> Building 4
> .
>
> I'm not sure if I should use a repeater and label or nested controls
> with a self join on the table. Or two separate sqldataconnections to
> populate two different controls with a loop to create a new control
> for each distinct value in the table.
>
> So far nothing seems to work.
>
> Any help or advice will be greatly appreciated.
>
> TIA
>
> Damien Johnston