 |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0  | This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

March 24th, 2009, 09:30 AM
|
|
Authorized User
|
|
Join Date: Mar 2007
Posts: 52
Thanks: 6
Thanked 2 Times in 2 Posts
|
|
ArticleListing - Order By...
In TheBeerHouse, the articles in ArticleListing are listed with the newest entry first. I expect this is because of the Order By ReleaseDate DESC clause in the SP. However, If I change this to Order By ReleaseDate ASC, the articles are still listed as before. TheBeerHouse use a GridView in ArticleListing.
In my Blog application, I use a ListView in the ArticleListing control, and I use the same Order By ReleaseDate DESC in my SP, but my articles are listed with the oldest first... Changing the Order By clause has no effect. Whether I use paging or not has no effect either
Is the order defined somewhere else?
|
|

March 24th, 2009, 10:01 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
|
|
philthy,
can't remember the TBH sp's/sql that well but it could well be that the cache hadn't expired after you made the change and therefore you were still getting the 'old' list from the BLL, rather than the refreshed DAL->BLL list...
just a thought...
|
|

March 24th, 2009, 10:36 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
|
|
Ditto to what Jimi said; that was my first thought.
|
|

March 24th, 2009, 01:44 PM
|
|
Authorized User
|
|
Join Date: Mar 2007
Posts: 52
Thanks: 6
Thanked 2 Times in 2 Posts
|
|
I was thinking of cache issues too, but I just assumed that it would work "out of the box" so to speak, if I kept the order by clause as Order By ReleaseDate DESC, just as in TheBeerHouse. Ill try playing around a little and write back...
Thanks guys...
|
|

March 24th, 2009, 04:55 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
|
|
philthy - it won't work 'out of the box' in this way as your edits were code edits, rather than data edits.
frustrating stuff i grant you and an area that i've addressed by creating a master 'reset' across the cache when i'm testing projects for this very reason.
so you see, 'you're not alone'!! 
|
|

March 25th, 2009, 07:40 AM
|
|
Authorized User
|
|
Join Date: Mar 2007
Posts: 52
Thanks: 6
Thanked 2 Times in 2 Posts
|
|
Ok, I'm not sure if I dare to tell what was wrong here. Turns out the error was located a couple of feet from the keyboard...
Since I'm still testing my application, every time I added a new article, I just entered the same release date, because it was easier to just click on the textbox and enter the previous value. As a result, all articles had the same release date, and thats why the newest entry came in last on the list..
Go ahead, laugh all you want...  
|
|

March 25th, 2009, 08:28 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2005
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
|
|
|
|

March 25th, 2009, 08:38 AM
|
|
Authorized User
|
|
Join Date: Mar 2007
Posts: 52
Thanks: 6
Thanked 2 Times in 2 Posts
|
|
Well, in that case, I must be really good
Thnx 
|
|

March 25th, 2009, 09:32 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
|
|
Quote:
Originally Posted by philthy
Ok, I'm not sure if I dare to tell what was wrong here. Turns out the error was located a couple of feet from the keyboard...
Since I'm still testing my application, every time I added a new article, I just entered the same release date, because it was easier to just click on the textbox and enter the previous value. As a result, all articles had the same release date, and thats why the newest entry came in last on the list..
Go ahead, laugh all you want...  
|
Okay, so this was my SECOND thought... 
|
|
 |