C
Confused Newbie
I'm coming from ASP and learning ASP.NET with VWD Express. I have a page in
ASP that shows an employee list by sections in a table like this:
East Coast
Person 1 in this category | Office Location | Phone
Person 2
North Central
Person 1
Person 2
South Central
Person 1
Person 2
West Coast
Person 1
Person 2
National Accounts
Name
Name
In ASP, I have an ADO recordset that contains just the categories in the
order they should display (select region_id, region_name order by
region_display_order from sales_regions), and another with the names that is
sorted by region and name (select region_id, name_last, name_suffix_gen,
name_first, name_middle from sales_reps order by region_id, name_last,
name_suffix_gen, name_first, name_middle). I loop through the regions, set
the filter on the reps to the region, and response.write the names until I
hit the end. This has worked fine for ages. (If it matters, the database
is Access 2003, and must remain that as SQL2005 is completely out of the
question until our hosting contract runs out in June.)
How do I change this to take advantage of ASP.NET's features and get rid of
that clunky, ancient looping code? The list uses CSS styles for the section
name cells, as well as the names. The names also are hyperlinks that the
viewer can click on to send them an email. I am completely lost as to how
to use datalists or repeaters or whatever to make this work. Can someone
point me to an example of how to do this using VB (sorry, I can't cope with
also trying to figure out C# at the moment), or post a step-by-step
walkthrough? Thanks.
ASP that shows an employee list by sections in a table like this:
East Coast
Person 1 in this category | Office Location | Phone
Person 2
North Central
Person 1
Person 2
South Central
Person 1
Person 2
West Coast
Person 1
Person 2
National Accounts
Name
Name
In ASP, I have an ADO recordset that contains just the categories in the
order they should display (select region_id, region_name order by
region_display_order from sales_regions), and another with the names that is
sorted by region and name (select region_id, name_last, name_suffix_gen,
name_first, name_middle from sales_reps order by region_id, name_last,
name_suffix_gen, name_first, name_middle). I loop through the regions, set
the filter on the reps to the region, and response.write the names until I
hit the end. This has worked fine for ages. (If it matters, the database
is Access 2003, and must remain that as SQL2005 is completely out of the
question until our hosting contract runs out in June.)
How do I change this to take advantage of ASP.NET's features and get rid of
that clunky, ancient looping code? The list uses CSS styles for the section
name cells, as well as the names. The names also are hyperlinks that the
viewer can click on to send them an email. I am completely lost as to how
to use datalists or repeaters or whatever to make this work. Can someone
point me to an example of how to do this using VB (sorry, I can't cope with
also trying to figure out C# at the moment), or post a step-by-step
walkthrough? Thanks.