473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP .NET Categories/(Count) Question

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


Nov 18 '05 #1
2 1317
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.

"Chad A. Beckner" <Ch*********@ProspectiveLink.com> wrote in message news:OO**************@TK2MSFTNGP09.phx.gbl...
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


Nov 18 '05 #2
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

"Raterus" <ra*****@spam.org> wrote in message
news:u0****************@TK2MSFTNGP09.phx.gbl...
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.

"Chad A. Beckner" <Ch*********@ProspectiveLink.com> wrote in message
news:OO**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Troy Lynch | last post by:
I'm working on writing a website which I need to have lists of products listed in categories and subcategories, and need to keep track of whats in the tree. Like how many products from the root all...
2
by: jeef | last post by:
Im setting up a database driving store running off of a sql database and asp. I want to have categories with subcategories. That way a customer can borrow down through my site to buy a product....
2
by: ameshkin | last post by:
I'm having all kinds of visual problems using dreamweaver's built in query builder. I have 4 different categories. Right. I want to show ten records from each category of items in a mysql...
13
by: hornedw | last post by:
I have been working on a ecommerce website for myself. What I needed some assistance on was when i was trying to display the categories/subcategories for the different products. I decided to use...
2
by: Arvin Portlock | last post by:
My SQL experience is pretty limited, sorry if this is a REALLY basic question. I have a database of bibliographic records. Each record is of a certain type as recorded in a Type field: books,...
4
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for...
2
by: elektrongyorsito via DBMonster.com | last post by:
Hello, I have 3 tables: T_component =TCO cmp_id | name 1 | door 2 | exhaust
2
by: ibec | last post by:
Hi I'm new to the forum and MySQL and PHP. I hope you'll excuse the simple question. Here's my problem: On our website I'm trying to put together a dynamic collection of links that will be presented...
0
by: sanju4kk | last post by:
i need to hide the sub categories of a tree while am clicking on the Parent. or i need to count the sub categories of of selected parent(if it have more than 2 or 3 sub categories) Thanx in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.