Groups | Blog | Home
all groups > asp.net > june 2004 >

asp.net : Calling ASP from ASPX


Ken Cox [Microsoft MVP]
6/10/2004 10:50:46 PM
Hi John,

Server.Execute won't cross the boundary between ASP and ASPX.

What happens if you use

Response.Redirect("mail.asp")

?

Ken
Microsoft MVP [ASP.NET]

[quoted text, click to view]
gemel
6/10/2004 11:14:47 PM
I have an existing ASP application that generates an e-mail when
someone visits the page. The page uses vbscript to creazte the mail
object and then populate it.

Firstly I tried to copy the script including the <% %> into the body
of the ASPX file. No errors occurred when the page was called, but no
mail was generated.

Next I tried re-create the code in the page_load event using <script>
tags with language set to vbscript. This time an error was generated
when I called the page.

Next I isolated the orginal ASP program and called it 'mail.asp' and I
called this directly from the browser. No problem here. The e-mail was
gemerated as expected. So I thought that I might simply call
'mail.asp' from ASPX using 'server.execute("mail.asp"). Now I get a
page error stating that it occurred dring the call to a child page.

Any tips on co-existing with ASP or converting ASP to ASPX please.

John
gemel
6/11/2004 9:01:45 AM
The problem here is that it gets messy because I want to transfer
control back to the original ASPX.

Thanks

John

On Thu, 10 Jun 2004 22:50:46 -0400, "Ken Cox [Microsoft MVP]"
[quoted text, click to view]
Ken Cox [Microsoft MVP]
6/11/2004 8:08:01 PM
Perhaps you can pass the name of the originating page in on the query string so it knows where to go back?

response.redirect("myasppg.asp?pg=origaspx.aspx")



[quoted text, click to view]
AddThis Social Bookmark Button