include file

S

Selen

Hi,
I am using following code for calling AllDoc.aspx file...But it give me
error.Error is that: There can be only one 'page' directive. When I delete
the page statement from AllDoc.aspx the sql code doesnt work...What must I
do?

<!-- #Include virtual=".\documents\AllDoc.aspx" -->
 
P

Philip Q [MVP]

Selen said:
Hi,
I am using following code for calling AllDoc.aspx file...But it give me
error.Error is that: There can be only one 'page' directive. When I delete
the page statement from AllDoc.aspx the sql code doesnt work...What must I
do?

<!-- #Include virtual=".\documents\AllDoc.aspx" -->

have you tried using something like -

Server.Execute("documents\AllDoc.aspx")

instead of an #include?
 
P

Patrice

It's likely because you have a page directive in the main as well as in the
include file.

Under ASP.NET, I wouldn't use include files anyway. Depending upon your
needs you could just create a user control (if you want to include an HTML
fragment) or a class file (if this is to have common code at your
disposal)....


Patrice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

include file 1
include file asp.net 1
#include virtual 2
Include files 2
ASP Include 2
forgot to mention 1
IIS mis-Configuration? SSI referencing .aspx file 4
Problems Including Files For URL redirect 3

Top