phugoid
phugoid

Reputation: 95

How can I link a JS script to IIS virtual directory browsing pages?

How can I want to run a script on the pages that IIS returns when you browse the contents of a virtual directory (visiting the folders).

The closest I could find was this full-blown module for generating pretty directory listings, where I could add a script to the page, but that's a lot more than I want.

Is there any simpler way that I can override/modify the default template page that gets used for displaying the directory contents?

Upvotes: 0

Views: 684

Answers (1)

Geoff Gunter
Geoff Gunter

Reputation: 151

Unfortunately I could not find any way to actually change that template.

The best I've been able to find is that you would have to develop your own IIS module or handler to override the default behavior: http://www.iis.net/learn/develop/runtime-extensibility/developing-iis-modules-and-handlers-with-the-net-framework. The link you provided would probably be the quickest route since the code is mostly done for you already.

Update: you could also just create your own default.asp page and place it in every folder you want to have your customized listing. Code sample can be found as the answer to this question here: http://www.webmasterworld.com/forum47/520.htm

Upvotes: 1

Related Questions