Data passing betw ASP & ASPX pages

Discussion in 'ASP .Net' started by =?Utf-8?B?VmFuZXNzYQ==?=, Jul 10, 2007.

  1. 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
     
    =?Utf-8?B?VmFuZXNzYQ==?=, Jul 10, 2007
    #1
    1. Advertising

  2. 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.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    http://gregorybeamer.spaces.live.com
    Co-author: Microsoft Expression Web Bible (upcoming)

    ************************************************
    Think outside the box!
    ************************************************
    "Vanessa" <> wrote in message
    news:...
    >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
     
    Cowboy \(Gregory A. Beamer\), Jul 10, 2007
    #2
    1. Advertising

  3. 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!!!!!!!!!!!!!!!!!!!!!

    "Cowboy (Gregory A. Beamer)" wrote:

    > 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.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    > http://gregorybeamer.spaces.live.com
    > Co-author: Microsoft Expression Web Bible (upcoming)
    >
    > ************************************************
    > Think outside the box!
    > ************************************************
    > "Vanessa" <> wrote in message
    > news:...
    > >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

    >
    >
    >
     
    =?Utf-8?B?VmFuZXNzYQ==?=, Jul 12, 2007
    #3
    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,185
    Kumar Reddi
    May 29, 2005
  2. James Yong
    Replies:
    0
    Views:
    558
    James Yong
    Sep 12, 2005
  3. Nirosh
    Replies:
    0
    Views:
    642
    Nirosh
    Apr 28, 2009
  4. 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,247
    Mirronelli
    Oct 22, 2005
  5. Vanessa

    Data passing betw ASP & ASPX pages

    Vanessa, Jul 9, 2007, in forum: ASP General
    Replies:
    1
    Views:
    176
    Anthony Jones
    Jul 10, 2007
Loading...

Share This Page