Data passing betw ASP & ASPX pages

Discussion in 'ASP General' started by Vanessa, Jul 9, 2007.

  1. Vanessa

    Vanessa Guest

    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
     
    Vanessa, Jul 9, 2007
    #1
    1. Advertising

  2. --
    Anthony Jones - MVP ASP/ASP.NET
    "Vanessa" <> wrote in message
    news:...
    > 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



    I don't what Navsion is and I don't how the 'message queue' fits in to all
    this etc. so your post is a little difficult to digest.

    The is phrase that I'm curious about "However, I can't simply do a sql
    statement anymore. The new integration will be using ASP.NET in C#. " Why
    ASP.NET?
     
    Anthony Jones, Jul 10, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John M
    Replies:
    1
    Views:
    1,310
    Kumar Reddi
    May 29, 2005
  2. James Yong
    Replies:
    0
    Views:
    594
    James Yong
    Sep 12, 2005
  3. =?Utf-8?B?VmFuZXNzYQ==?=

    Data passing betw ASP & ASPX pages

    =?Utf-8?B?VmFuZXNzYQ==?=, Jul 10, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    459
    =?Utf-8?B?VmFuZXNzYQ==?=
    Jul 12, 2007
  4. Nirosh
    Replies:
    0
    Views:
    666
    Nirosh
    Apr 28, 2009
  5. RadioSignal

    passing variables from .aspx.cs code pages to .aspx pages

    RadioSignal, Sep 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    2,389
    Mirronelli
    Oct 22, 2005
Loading...

Share This Page