ASP .NET Categories/(Count) Question

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
 
R

Raterus

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.
 
C

Chad A. Beckner

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top