469,359 Members | 1,606 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,359 developers. It's quick & easy.

dynamic includes of asp code

I have seen the discussion below of how to use dynamic
includes to get the info into the page. This is very
helpful but does not quite fit my issue.

I am currently using an include to pull in a file
containing user defined variables in vbscript. I pull
these into the page which lets the user set certain
variables without touching the ASP.

I now want to dynamically include this user defined page
but ran into the problem listed below.

Can anyone think of a way I can get around this problem.

Thanks,
Gary
Jul 19 '05 #1
4 2180
Where's the problem listed below?

Ray at home

"Gary Contois" <gc******@meditech.com> wrote in message
news:09****************************@phx.gbl...
I ran into the problem listed below.

Jul 19 '05 #2
The problem listed in the previous messages that you
cannot use a dynamic include since it is preprocessed.
-----Original Message-----
Where's the problem listed below?

Ray at home

"Gary Contois" <gc******@meditech.com> wrote in message
news:09****************************@phx.gbl...
I ran into the problem listed below.

.

Jul 19 '05 #3
What is it you're trying do then? ARe you trying to do something like (if
this would work, anyway)

<%

Select Case sUsername
Case "Ray" %>
<!-- #include file="personalvars/ray.inc" -->
<% Case "Gary" %>
<!-- #include file="personalvars/ray.inc" -->
<% ''etc.
End Select
%>

Ray at work

"Gary Contois" <gc******@meditech.com> wrote in message
news:11****************************@phx.gbl...
The problem listed in the previous messages that you
cannot use a dynamic include since it is preprocessed.
-----Original Message-----
Where's the problem listed below?

Ray at home

"Gary Contois" <gc******@meditech.com> wrote in message
news:09****************************@phx.gbl...
I ran into the problem listed below.

.

Jul 19 '05 #4
Ray at <%=sLocation%> wrote on 19 sep 2003 in
microsoft.public.inetserver.asp.general:
What is it you're trying do then? ARe you trying to do something like
(if this would work, anyway)

<%

Select Case sUsername
Case "Ray" %>
<!-- #include file="personalvars/ray.inc" -->
<% Case "Gary" %>
<!-- #include file="personalvars/GARY.inc" -->
<% ''etc.
End Select
%>


It will certainly work, but do not be surprised if a code in the "unused"
include file crashes the page.

If the sUsername = "Ray",
having an extra "End Select" statement in GARY.inc will probably do so.

The to be used and the not to be used file are both loaded and become part
of the code to be rendered.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by meyousikmann | last post: by
6 posts views Thread by Materialised | last post: by
reply views Thread by Pascal Costanza | last post: by
1 post views Thread by Satish.Talyan | last post: by
7 posts views Thread by Ajinkya | last post: by
6 posts views Thread by =?ISO-8859-1?Q?Tim_B=FCthe?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.