Ask a Question related to ASP.NET General, Design and Development.
-
Cowboy \(Gregory A. Beamer\) #1
Re: help needed to find the right control for the job.
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
Cowboy \(Gregory A. Beamer\) Guest
-
Help needed. I Cannot find TITLE attribute for A tags
Can anybody tell me how I can edit/add TITLE attributes in A tags? I cannot find this anywhere. Thanks Rob -
date control ?? Help needed
is there a simple control to add in my custom server control to select a date. On my page I show several fields and I prefer something like a... -
CountrySelector Control : help needed
Hello all I am developing a CountrySelector control (which I would like to share with anyone), but I am quite a newby in this custom control... -
Control Guru Needed
I am having a hard time with setting a property on a custom server control that i am placing in a repeater. The control inherits from... -
Help needed - find method or similar
Hello all, I am a newbie regarding ms-access. I made a form, containing a combobox wich gets is display values from a query. What I want to achieve...



Reply With Quote

