[thelist] dynamic includes in ASP?

Madhu Menon webguru at vsnl.net
Tue Dec 31 00:26:01 CST 2002

At 10:53 AM 31-12-02, Jeremy Weiss wrote:
>why not have a
>page called main.asp and all the links point to something like

Two reasons:

1) Not friendly towards search engines
2) Potential security hole. If someone can get a page to be executed by
just adding its URL as a parameter, that's a hole.


>and have the VBScript pull the value for pageurl and use it in the include
>further down the page like...
><!--#include file="<%=pageurl%>"-->
>Great idea I thought... unfortunately it's not working.  I keep getting an
>error that says
>The include file '<%=pageurl%>' was not found.

That's because includes are processed before the ASP engine gets to the ASP

If you want to do this, however, IIS 5.0 introduces a new method for the
Server object called Server.Execute


So you can just do:

Server.Execute strPageURL

Much better than conditional includes in ASP 2.0
http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20249209.html )

>Anyone know of a way around this?  Just wondering.... if the answer is
>obvious blame it on the medication.

The answer to something is always obvious to *someone*, but not necessarily
to all. ;)

(Was that philosophy? Gawd, blame *my* medication then.)



<<<   *   >>>
Madhu Menon
Internet User Experience Consultant
e-mail: webguru at vsnl.net   |   Yahoo messenger: cold_logic

Content * Interfaces * Usability * Net Strategy

More information about the thelist mailing list