ASP 101 - Active Server Pages 101 - Web04
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:
id (+ / -) last_name (+ / -) first_name (+ / -) sales (+ / -)
1 Fuller Andrew 5000
2 Leverling Janet 6250
3 Buchanan Steven 3245
4 Peacock Margaret 4685
5 King Robert 5290
6 Andersen David 6420
7 Edwards Frank 3840
8 Richards Kate 4260
9 Jones Edward 3450
10 Callahan Laura 3675
11 Miller Greg 5640
12 Steel Tammy 3570
13 Dodsworth Nancy 2750
14 Nelson Beth 4345
15 Hopkins Peter 6710
16 Graham Chris 4050
17 Thompson Vincent 4820
18 Ostrander Ian 3965
19 Quinn Howard 5865
20 Smith Fred 6370
21 Ingraham Owen 4750
22 Youngs Quincy 4420
23 Zimmerman Walter 4980
24 Valentino Linda 2965
25 Underwood Debra 3790
26 Xavier Simon 5580
27 White Mark 4500

ASP HTML Download            FAQ

ASP.NET Version

This piece of sample code allows users to sort data from a database by simply clicking on the heading of the field they would like to sort by. It's relatively simple to implement and can make finding that certain database record much easier.

The code is pretty straightforward. Give it a look...

Alternate Version: Simpler Looking Header with Arrows

One of our readers recently sent me an email with some ideas to improve our database sort sample above. Here's a excerpt from that email:

Rather than have two links, '+' and '-', you can remember the current state in a variable and simply toggle between the two by clicking the field name itself. Or, as I've done here, provide feedback as to the order by using arrows.

The code that was sent worked fine, but was a little complex and was obviously taken from a highly modified version of the code. I've simplified things a bit and incorporated both suggestions: the simpler UI (just clicking on the field name) and the indicator arrows.

Database Sort (with Arrows)


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