472,143 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

include file

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" -->
Nov 18 '05 #1
5 3015
No I didnt try... What its syntax Am I writing in < > tag?

thanks
"Philip Q [MVP]" <wi******@mvps.org>, iletide sunu yazdi
news:eo****************@TK2MSFTNGP10.phx.gbl...
Selen wrote:
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?

--
Philip Q
Microsoft MVP [ASP.NET]

Nov 18 '05 #2
Selen wrote:
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?

--
Philip Q
Microsoft MVP [ASP.NET]
Nov 18 '05 #3
No I didnt try... What its syntax Am I writing in < > tag?

thanks
"Philip Q [MVP]" <wi******@mvps.org>, iletide sunu yazdi
news:eo****************@TK2MSFTNGP10.phx.gbl...
Selen wrote:
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?

--
Philip Q
Microsoft MVP [ASP.NET]

Nov 18 '05 #4
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
"Selen" <sk*****@yahoo.com> a écrit dans le message de
news:u7****************@TK2MSFTNGP11.phx.gbl...
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" -->

Nov 18 '05 #5
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
"Selen" <sk*****@yahoo.com> a écrit dans le message de
news:u7****************@TK2MSFTNGP11.phx.gbl...
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" -->

Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by wukexin | last post: by
28 posts views Thread by Ramesh | last post: by
60 posts views Thread by Derrick Coetzee | last post: by
9 posts views Thread by bill | last post: by
12 posts views Thread by Francois Grieu | last post: by
9 posts views Thread by zolli | last post: by
5 posts views Thread by David Mathog | last post: by
6 posts views Thread by tshad | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.