Tree View

  • Thread starter Thread starter shapper
  • Start date Start date
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
 
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
 
Back
Top