Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Choosing an approach ...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Maximilian - 23 Oct 2007 13:58 GMT
I would like som input on what approach to choose for the scenario I have ...

Im making a simple asp-app to list the Top 50 something and also allow
visitors to vote on items and add new suggestions. The top-list should be
divided into parts of 10 items each where the first 10 are extra large and
highlighted, the next 10 less highlighted and so on...

Im using VS 2008 beta 2 with SQL Express as database.

Previously I used to make almost all my sites using only XML and XSLT and it
worked pretty well. But for this project I want to learn ASP better since I
havnt worked much with it since the classic ASP-days and much seem to have
changed since then.
To start with, the Repeater seems to be what I need. I have hooked it up to
my database using a SqlDataSource. I now have one list with all items in the
database. Now I want 5 Repeaters with 1-10 in the first, 11-20 in the second
and so forth. How do i accomplish this? It should be easy and it probably is
bit I cant figgure it out. It doesnt seem to be possible to select a
subset-range of items from the database? The closest I could get was using
SELECT TOP 20 * ... but that isnt good enough obviously. And anyway, shouldnt
it be more effective to first fetch the TOP 50 items and the distribute them
accordingly using code-behind? I mean to reduce the number of calls to the
database. But is this possible?
Secondly, I have looked into the new LINQ feature and it seemed to have some
methods SKIP and TAKE which could come in handy. But when creating a
LinqDatasource the populate my list I dont get any options to use these
methods. I always get the entire Table without any possibility to apply a
range-filter of any sort...
bruce barker - 23 Oct 2007 16:28 GMT
using ranking functions in sqlserver you should be able to load your 50
into a dataset and identify each group. then create views for each group
with the dataset. then bind the views.

-- bruce (sqlwork.com)

> I would like som input on what approach to choose for the scenario I have ...
>
[quoted text clipped - 24 lines]
> methods. I always get the entire Table without any possibility to apply a
> range-filter of any sort...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.