Tree View

S

shapper

Hello,

I am getting a list of months and years and the number of posts in
each month from a database:

SELECT YEAR(PublishedDate), MONTH(PublishedDate), COUNT(*) AS POSTS
FROM Table
GROUP BY YEAR(PublishedDate), MONTH(PublishedDate)

How can I display it in a TreeView. Something as follows:

2007
March(20)
February(15)
January(10)
2006
December(12)
November(15)
...

Each month should also be a link as follows:

Page.aspx?month=1/month/year

Thanks,

Miguel
 
B

Ben Rush

I'm pretty sure you're not going to be able to directly bind an expression
like that to the treeview and have it magically work (that is, unless I'm
missing something in particular). You're just going to have to get your
result data back and build the tree view manually.

Look at the ASP.Net treeview control for details.

http://www.15seconds.com/issue/041117.htm
 

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
474,000
Messages
2,570,252
Members
46,848
Latest member
CristineKo

Latest Threads

Top