ASP .NET Categories/(Count) Question

  • Thread starter Thread starter Chad A. Beckner
  • Start date Start date
C

Chad A. Beckner

Hey all,

Does anyone have an example of where I can find ASP .NET code for creating
categories followed by the count (number of items in the category) page? I
can't find an example! :-( and example of what I am looking for can be
found at http://www.411asp.net/, looking like the following:

Web Applications (272)
Content Managers, Forum, E-Commerce, ...

ASP.net Hosting (236)
Shared Hosting, Dedicated Servers, ...

Classic ASP (8575)
ASP Web Apps, ASP Components, ...
Component & Controls (573)
Calendar, Charts, Communication, ...

Software & Server (122)
Code Editors, Desktop Software, Server Software, ...

Tutorials & Code Snips (4202)
Learning ASP.net, How To, Make Web Apps, ...



Thanks in advance!

Chad
 
Where is this data coming from? It sounds more like something you need to do in sql than asp.net

Lets say you had a table with two fields, category and name

the sql to get results like what you are after is like this

select category, count(category) as category_count
from myTable
Group by category

The end result would be a listing of all your categories, with a count of how many names were in each category.
 
Here is the structure:

tblMainCategory_Selections
tblCategory_Selections

I need to know how many records in the tblCategory_Selections belong to a
particualar record in tblMainCategory_Selections

Thoughts?

Chad

Where is this data coming from? It sounds more like something you need to
do in sql than asp.net

Lets say you had a table with two fields, category and name

the sql to get results like what you are after is like this

select category, count(category) as category_count
from myTable
Group by category

The end result would be a listing of all your categories, with a count of
how many names were in each category.
 
Back
Top