Hi there,
I need to include an ASPX page within an ASP page. Is this possible?
EG:
making-a-claim.asp is:
<!-- #include file="top.asp" -->
<!-- #include virtual="/contactform/contact.aspx" -->
<!-- #include file="bottom.as p" -->
I get the error:
"Page Command Out Of Order
/contactform/contactus.aspx, line 1
The @ command must be the first command within the Active Server Page.
"
Will I have to go down the IFrame route instead?
Thanks,
Chris 5 8040
Hi Chris,
With that way that includes work in ASP, no this will not work. When you
include files, you're essentially joining two files together before any ASP
is even processed. So, by doing what you're doing, you'd be trying to
execute the contents of the ASPX file using asp.dll.
Ray at work
"Chris Ashley" <ch***********@ gmail.com> wrote in message
news:11******** **************@ v46g2000cwv.goo glegroups.com.. . Hi there,
I need to include an ASPX page within an ASP page. Is this possible?
EG:
making-a-claim.asp is:
<!-- #include file="top.asp" -->
<!-- #include virtual="/contactform/contact.aspx" -->
<!-- #include file="bottom.as p" -->
I get the error:
"Page Command Out Of Order
/contactform/contactus.aspx, line 1
The @ command must be the first command within the Active Server Page. "
Will I have to go down the IFrame route instead?
Thanks,
Chris
Could you not do it the nother way round though, i have seen code for
including an asp page in an aspx page ?
"Ray Costanzo [MVP]" wrote: Hi Chris,
With that way that includes work in ASP, no this will not work. When you include files, you're essentially joining two files together before any ASP is even processed. So, by doing what you're doing, you'd be trying to execute the contents of the ASPX file using asp.dll.
Ray at work
"Chris Ashley" <ch***********@ gmail.com> wrote in message news:11******** **************@ v46g2000cwv.goo glegroups.com.. . Hi there,
I need to include an ASPX page within an ASP page. Is this possible?
EG:
making-a-claim.asp is:
<!-- #include file="top.asp" -->
<!-- #include virtual="/contactform/contact.aspx" -->
<!-- #include file="bottom.as p" -->
I get the error:
"Page Command Out Of Order
/contactform/contactus.aspx, line 1
The @ command must be the first command within the Active Server Page. "
Will I have to go down the IFrame route instead?
Thanks,
Chris
Given that ASP and ASPX are handled by different ISAPI applications, no.
That is not possible.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Chris Ashley" <ch***********@ gmail.com> wrote in message
news:11******** **************@ v46g2000cwv.goo glegroups.com.. . Hi there,
I need to include an ASPX page within an ASP page. Is this possible?
EG:
making-a-claim.asp is:
<!-- #include file="top.asp" -->
<!-- #include virtual="/contactform/contact.aspx" -->
<!-- #include file="bottom.as p" -->
I get the error:
"Page Command Out Of Order
/contactform/contactus.aspx, line 1
The @ command must be the first command within the Active Server Page. "
Will I have to go down the IFrame route instead?
Thanks,
Chris
re: i have seen code for including an asp page in an aspx page
Where have you seen that ? Can you post the link ?
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"clickon" <cl*****@discus sions.microsoft .com> wrote in message
news:45******** *************** ***********@mic rosoft.com... Could you not do it the nother way round though, i have seen code for including an asp page in an aspx page ?
"Ray Costanzo [MVP]" wrote:
Hi Chris,
With that way that includes work in ASP, no this will not work. When you include files, you're essentially joining two files together before any ASP is even processed. So, by doing what you're doing, you'd be trying to execute the contents of the ASPX file using asp.dll.
Ray at work
"Chris Ashley" <ch***********@ gmail.com> wrote in message news:11******** **************@ v46g2000cwv.goo glegroups.com.. . > Hi there, > > I need to include an ASPX page within an ASP page. Is this possible? > > EG: > > making-a-claim.asp is: > > <!-- #include file="top.asp" --> > > <!-- #include virtual="/contactform/contact.aspx" --> > > <!-- #include file="bottom.as p" --> > > I get the error: > > "Page Command Out Of Order > > /contactform/contactus.aspx, line 1 > > The @ command must be the first command within the Active Server Page. > " > > Will I have to go down the IFrame route instead? > > Thanks, > > Chris >
Chris,
the only way you could "include" an aspx page in a classic ASP page is by
having an IFRAME in the ASP page whose source is the aspx page. You can
control borders, width etc to make it look like it is seamless.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Chris Ashley" wrote: Hi there,
I need to include an ASPX page within an ASP page. Is this possible?
EG:
making-a-claim.asp is:
<!-- #include file="top.asp" -->
<!-- #include virtual="/contactform/contact.aspx" -->
<!-- #include file="bottom.as p" -->
I get the error:
"Page Command Out Of Order
/contactform/contactus.aspx, line 1
The @ command must be the first command within the Active Server Page. "
Will I have to go down the IFrame route instead?
Thanks,
Chris
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chumley the Walrus |
last post by:
I'm trying to do some ASP date formatting in a separate include file
on my .aspx page, but I keep getting "Statement cannot appear within
method body, expected end of statement" error when running this page.
The header code begins as:
<%@ Page Language="VB" debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<!-- #include file=dayofweekparse.asp -->
|
by: bc |
last post by:
Hello all,
I have a classic ASP web app that requires some new reporting features
that I have written in ASP.Net (a .net web application that makes use
of a .net webservice on the same box). To incorporate the ASPX page
inside the classic ASP page, I added an IFRAME to the ASP page and
referenced the ASPX as the src attribute. Everything seems to work
okay when hitting the web app by itself, but when using the .net web
app via the ASP...
|
by: djeddiej |
last post by:
Hello
I am running IIS 5.1 on Win XP Pro with all the latest patches and updates. I have installed the .NET framework and attempted to run a simple .aspx page from the sample microsoft .net tutorials. The page contains a form with a text field that is populated with a value once the form is submitted. When the page is viewed in the web browser, the server code is revealed in the text field, and the page (and any other .aspx pages) does not...
|
by: roger janssens via DotNetMonster.com |
last post by:
hello all.
i'm used to scripting in php. there, you just include(bla.php) and it
works. so i have a template that defines my layout and stays the same
forever, but in that file, there's a table that's filled in with other
pages, header.php, footer.php, menubar.php,
i was trying to do the same with .net, but every page i try to include has
his own page directive (well, i need the code behind... so i can't just
delete those page...
|
by: matvdl |
last post by:
I have a system that was originally developed in asp - the pages are saved in
SQL (there are over 10,000 pages) and saved to a temp directory in the server
when requested by a client.
I have updated this system and changed the pages that are saved to the
server as aspx - everything works fine and pages can be served - but
Its not impossible for a single client to request 100 plus pages in one
session - as each page is requested it is...
| |
by: John Rivers |
last post by:
Hello,
What good reason there is for not allowing methods in ASPX pages I
can't imagine, but here is how to get around that limitation:
(START)
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
<%
|
by: moondaddy |
last post by:
I have a .net 2.0 winforms app that calls a web service which creates
creates a GUID and caches it, then passes the GUID back to the winform.
then it opens a aspx page and passes the GUID as a parameter. this GUID is
only cached for about 10 seconds and must be still cached for the page to
load. otherwise, the page redirects to a error page. all of this forces the
page to only be called from winforms app.
I can debug from the winform...
|
by: =?Utf-8?B?QnJhbmRvbg==?= |
last post by:
Hi,
I have an aspx page that has the "include" code in it which includes another
page that displays information. I also have an upload page that allows users
to upload a simple html document onto the server. The include code calls that
html page to display the text on that page. The problem is when the user
uploads that html page, the aspx page does not refresh to reflect those
changes, even if the user hits refresh in their browse....
|
by: =?Utf-8?B?UGFsYW4=?= |
last post by:
I have a problem with IIS and .NET 2.0. When I post to an aspx page
everything acts as expected, the page is executed and I get the correct
response. But when I send a GET request IIS just returns the code of the aspx
page.
I tried switching to .NET 1.1 and it did not behave this way.
I have been unable to discover why this happens. Any help would be
appreciated.
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |