473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Calling ASP from ASPX

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

Nov 18 '05 #1
3 4354
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]

"gemel" <jo***@glenavon1.demon.co.uk> wrote in message
news:np********************************@4ax.com...
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


Nov 18 '05 #2
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]"
<BA************@sympatico.ca> wrote:
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]

"gemel" <jo***@glenavon1.demon.co.uk> wrote in message
news:np********************************@4ax.com.. .
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


Nov 18 '05 #3
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")

"gemel" wrote:
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]"
<BA************@sympatico.ca> wrote:
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]

"gemel" <jo***@glenavon1.demon.co.uk> wrote in message
news:np********************************@4ax.com.. .
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


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Patrick | last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application? However, would I only be able to call...
15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
2
by: Christopher Ambler | last post by:
I'm wondering if there's a solution here - I have an ASPX page with a sole purpose of scaling an image. The ASPX page contains a single line with the codebehind tag, and the .cs file contains...
1
by: Benny | last post by:
hello all, currently im working on an asp.net web application using c#. im able to calling a javascript funtion in the .aspx page from the .aspx.cs page method. however, now i want other way...
5
by: Mark Fox | last post by:
Hello, I have a page DoBatchWork.aspx that my web host's cron requests periodically. It currently calls another web page that does some batch processing. The code I am currently using in...
2
by: Vai2000 | last post by:
Hi All, I have an ASPX Application. Now I have to write a WinSvc which actually uses 95% of the functionality present in the aspx application. I was thinking of calling the aspx DLL from my WinSvc....
6
by: johnf401 | last post by:
I've got a VB .NET Web application that has several frames (for discussion sake, let's call them Form1.aspx and Form2.aspx). I want to be able to call a code module in Form2.aspx.vb from code...
3
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. ...
1
by: DevNll2002 | last post by:
Can it be done? ( This is a related issue to my recent post... http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/a229a66642bedfaf/870614ae257ae699...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.