ASP 101 - Active Server Pages 101 - Web05
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash




Script Output:

SQL Query: SELECT * FROM [sales] ORDER BY [SalesmanId] asc;

SalesmanId (+ / -) Timestamp (+ / -) Amount (+ / -)
1 7/23/2002 11:43:00 AM 3000
1 7/24/2002 11:43:00 AM 2000
2 7/24/2002 11:43:00 AM 3000
2 7/23/2002 11:43:00 AM 3250
3 7/23/2002 11:43:00 AM 1200
3 7/24/2002 11:43:00 AM 2045
4 7/24/2002 11:43:00 AM 3085
4 7/23/2002 11:43:00 AM 1600
5 7/23/2002 11:43:00 AM 2000
5 7/24/2002 11:43:00 AM 3290
6 7/24/2002 11:43:00 AM 4900
6 7/23/2002 11:43:00 AM 1520
7 7/23/2002 11:43:00 AM 1840
7 7/24/2002 11:43:00 AM 2000
8 7/24/2002 11:43:00 AM 2700
8 7/23/2002 11:43:00 AM 1560
9 7/23/2002 11:43:00 AM 2140
9 7/24/2002 11:43:00 AM 1310
10 7/24/2002 11:43:00 AM 2075
10 7/23/2002 11:43:00 AM 1600
11 7/23/2002 11:43:00 AM 2150
11 7/24/2002 11:43:00 AM 3490
12 7/24/2002 11:43:00 AM 2340
12 7/23/2002 11:43:00 AM 1230
13 7/23/2002 11:43:00 AM 1360
13 7/24/2002 11:43:00 AM 1390
14 7/24/2002 11:43:00 AM 3245
14 7/23/2002 11:43:00 AM 1100
15 7/23/2002 11:43:00 AM 1900
15 7/24/2002 11:43:00 AM 4810
16 7/24/2002 11:43:00 AM 2710
16 7/23/2002 11:43:00 AM 1340
17 7/23/2002 11:43:00 AM 1320
17 7/24/2002 11:43:00 AM 3500
18 7/24/2002 11:43:00 AM 1355
18 7/23/2002 11:43:00 AM 2610
19 7/23/2002 11:43:00 AM 3210
19 7/24/2002 11:43:00 AM 2655
20 7/24/2002 11:43:00 AM 3220
20 7/23/2002 11:43:00 AM 3150
21 7/23/2002 11:43:00 AM 750
21 7/24/2002 11:43:00 AM 4000
22 7/24/2002 11:43:00 AM 4000
22 7/23/2002 11:43:00 AM 420
23 7/23/2002 11:43:00 AM 980
23 7/24/2002 11:43:00 AM 4000
24 7/24/2002 11:43:00 AM 2400
24 7/23/2002 11:43:00 AM 565
25 7/23/2002 11:43:00 AM 2100
25 7/24/2002 11:43:00 AM 1690
26 7/24/2002 11:43:00 AM 3000
26 7/23/2002 11:43:00 AM 2580
27 7/23/2002 11:43:00 AM 2450
27 7/24/2002 11:43:00 AM 2050

ASP HTML Download            FAQ

ASP.NET Version

This works just like our Database Sort sample except it adds the ability to sort by multiple fields. I attached it to a different table (one that had multiple records with the same value in some fields) so that you could see it actually working.

The last field clicked is the highest priority sort. So if you want to see the entries sorted by SalesmanId (Ascending) and then by the Amount of the sale (Ascending) you would click on the + next to the Amount heading and then by the + next to the SalesmanId heading.

The script will go back as many sort criteria as you want but it removes duplicates so if you sort by SalesmanId Ascending and then by SalesmanId Descending, only the last desc is passed to the database.

The only real thing missing is some sort of pretty indicator telling you the current sort sequence, but, if you hadn't already noticed, UI design isn't really our thing... we'll leave it to you.


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES