PDA

Click to See Complete Forum and Search --> : #include problems.


nybble
Mar 20th, 2001, 10:54 PM
i am creating this webpage and i wanted to use an include... so i did this...


Response.Write("<!--#include file=" & Request.QueryString("file") & ">")


now this is really annoying cause it is printing the include in the html (when i right click and view) but it refuses to process it. does anyone know a solution to this or another way around it?

JasonGS
Mar 21st, 2001, 01:41 AM
I had run into those once, and I thought I had it solved with:

<!-- #include file="<%=Request("file")%>" -->

...but it didn't work either; it still wouldn't go, so I just gave up on it!

Active
Mar 21st, 2001, 01:50 PM
Server side Directives like Include file
are Processed first before the actual script processing begins ...

So...You cannot Write the SSI directive from a Server Side Scripting Language.

You have to put something directly like this outside
<% %>

<!-- #include file="filename.ext" -->

Can't Help..

nybble
Mar 21st, 2001, 02:03 PM
so there isn't like some super secret vb function that would do what i want to do? come on microsoft... u gotta think of these things.

nybble
Mar 21st, 2001, 02:27 PM
the solution:

<% Server.Execute Request.QueryString("page") %>


mi so happi!