[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Sorting IIS Directory Browsing

Posted on 2011-05-10
6
Medium Priority
?
2,136 Views
Last Modified: 2012-05-11
Dear Experts,
I'm trying to implement an simple web page for listing documents within a folder giving the user the possibility to sort files by name, size or date.
So far the best code I found on the internet is this: http://www.daleanderson.ca/edb/ 
The display is fairly nice but it only allows me to sort A->Z not Z->A and I need both.
My server is a Windows 2003 SP2 (IIS6) and I have no plan to migrate to Windows 2008 any time soon.
I have two questions:
Do you have any better way to implement this kind of sorting?
Do you think this could be achieved with JS (in particularly big folders it would come useful to do the sorting client side)?

P.S.: WebDav at the moment is not an option

Thank you,
Roberto.
0
Comment
Question by:martineit
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:GundogTrainer
ID: 35728675
It may be a good starting point as it builds a record set that you can then loop through to display the data however you need.

Sorting is by the line
rsFSO.Sort = "Type DESC, Size ASC "
A bit of form request and logic would be able to change the sort depending on the links,

FSO Sort Folder Contants

Is this the sort of thing your looking for (before I spend while looking at it)
0
 
LVL 1

Author Comment

by:martineit
ID: 35728714
Hi,
thank you for your answer. I know I could achieve that by using FSO sorting but I wanted to avoid to re-write code, it seems unbelivable to me that noone ever wrote this code.
I've already found a way to obtain the reverse (z->a) sorting by simply taking the code from the link I posted originally and did a reverse array.
Now I'm actually more interested in finding a way to do the sorting using JS (to compare the execution time for each solution), has anyone ever done that?

Thanks,
Roberto.
0
 

Expert Comment

by:ericfkw
ID: 35751830
If don't want to rewrite the code, you can try to use the sort in querystring:

For Example, sort=1 is Z to A
http://www.daleanderson.ca/edb/download/Default.asp?sort=1&FolderSpec=%2Fedb%2Fdownload

sort=2 is A to Z
http://www.daleanderson.ca/edb/download/Default.asp?sort=2&FolderSpec=%2Fedb%2Fdownload

So by this way you can only add a code to set 2 as default.

Hope this help.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:martineit
ID: 35776566
Hello,
As I said in my previous post: "I've already found and applied the ASP solution".
At the moment I would like to find out if it's possible to do the same using JS.

Any idea?

Thanks,
Roberto.
0
 

Accepted Solution

by:
ericfkw earned 1500 total points
ID: 35791444
As I knew that, classic JS is not a perfect solution for sorting, but I think you can have a look on JQuery, however, basically you might need refine your ASP coding a bit as some sorting is by DIV tag and LI tag ...etc

Here is some example:
http://plugins.jquery.com/plugin-tags/sort

Hope this help. :)
0
 
LVL 1

Author Closing Comment

by:martineit
ID: 36016771
Doesn't really answer my question and right now I don't have time to "have a look" at something (I was hoping for some ready made piece of code).
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question