Here's a query for you, using the Northwind database.
You can easily adjust it for news articles.
Select OrderID , OrderDate , datepart(yyyy , OrderDate) as OrderYear ,
datepart(m , OrderDate) as OrderMonth from Orders
WHERE
DATEDIFF ( yyyy , OrderDate , '1/1/1999' ) <=2
ORDER BY
datepart(yyyy , OrderDate) DESC , datepart(m , OrderDate) DESC
"sloan" <sl***@ipass.netwrote in message
news:Oc*************@TK2MSFTNGP03.phx.gbl...
You want to do a "nested repeater"
http://www.google.com/search?hl=en&q=nested+repeater
Its up to you to fill a DataSet with the correct data.
You might want to use DATEPART to get your articles into different date
ranges.
(if you're using sql server)
<an***********@googlemail.comwrote in message
news:11*********************@p77g2000hsh.googlegro ups.com...
Hi,
I am trying to display my news articles by month, i am aproaching this
via the use of a nested repeater so that the main rptr will display
the month abnd then using itemdatabound i can pull all articles for
that month.. What i am struggling with is the code to programatically
fill the main repeater with months automatically, any help to achieve
this would be greatly appreciated..
eg:
April 2007
news1
news2
news3
March 2007
news1
news2
news3
Feb 2007
news1
news2
news3
Jan 2007
news1
news2
news3
Dec 2006
news1
news2
news3
Cheers Anthony