Data passing betw ASP & ASPX pages

G

Guest

I am not sure should I post it to the ASP or ASP.NET forum, so I posted both.


My company's internal website is written in ASP, and it has couple sections
that link to our internal software via function calls/include statements (The
website itself has a database, while our internal sofware is another
database). For example,

===============
test1.asp:
===============
<!--#include file="../mal/functionSO.asp"-->

<%
'...
'process some data
'...

var1 = request.form("var1")
var2 = request.form("var2")
var3 = request.form("var3")

TestResult = createSO (var1, var2, var3)

'...
'process more data based on the value at TestResult
'...
%>

===============
functionSO.asp:
===============
<%
function createSO (var1, var2, var3)

'it will first validate the parameters, and then insert a record, e.x. Sales
Order, into
our internal accounting software via SQL statement.

end function
%>

Recently we are changing our internal software to Navision, so all the
integration with the current software needed to be re-done on the website
(!!). However, I can't simply do a sql statement anymore. The new
integration will be using ASP.NET in C#. Here is the new flow per our new
software:

- Pass the parameters to the ASP.NET pages, the code behind it will be
written in C#.
- It will pass the data thru the Web Services, and then to the message queue.
- From there Navision Application Server will pick up the data from message
queue and their programmers will write up the codeunit at Navision for
creating the SO (for example) and return some other variables back to the
message queue.
- And the same asp.net page will pick up the return variables and display
accordingly.

Here is my question, how do I suppose to pass the variables from ASP page to
ASP.NET page and get the variables back afterwards effectively?

I don't want to change the whole ASP pages into ASP.NET pages as we have so
many customizations built into it already. I did think of a way but that
require to build down the whole flow into many different pages. And too bad
that Server.Execute can't pass the query string. That is,

===============
test1.asp:
===============
<%
'...
'process some data
'...

var1 = request.form("var1")
var2 = request.form("var2")
var3 = request.form("var3")

%>

<form post="newMethod.aspx">
<input type="hidden" name="var1" value="<%=var1%>">
<input type="hidden" name="var2" value="<%=var2%>">
<input type="hidden" name="var3" value="<%=var3%>">
</form>
<javascript>//submit the form by itself</javascript>

===============
newMethod.aspx:
===============
'it will pass data to the webservices and so on.. and get back some
variables (TestResult).

response.redirect "test1-secondpart.asp?TestResult=" &TestResult


===============
test1-secondpart.asp:
===============
<%
TestResult = request("TestResult")
'...
'process more data based on the value at TestResult
'...
%>

Besides above long way, can anyone suggest a better way? Please help!!!

Thanks!!!!!!!
Vanessa
 
C

Cowboy \(Gregory A. Beamer\)

I would rewrite it, personally. Yes, rewriting the customizations will be a
pain, but not biting the bullet now will leave the application in a
potential error prone state.

You can pass via the URL (as you have indicated), if you desire. It is one
way of going back and forth. But, you also have to link Sessions (possible,
but painful) and a few other things, unless you have no authentication on
the site. If you need a temporary solution, passing via QueryString (on the
URL) will work.

Plus, you have probably learned more about your business and have some flows
that are not that great. It would be better to do it right instead of
band-aiding the whole thing. Just my two cents.
 
G

Guest

Thanks for your information, however my project's time frame is so tied that
I can't redo the whole thing.

Actually I do have another way to pass data from first.asp to process.aspx
and the control back to first.asp - is to use XMLHTTP. However, it will
freeze the IE if more than 2 connections to the server!!!!! Please advise
any other ways that will do the same thing as calling XMLHTTP but not
freezing up the server.

please help!!!!!!!!!!!!!!!!!!!!!
 

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top