943,616 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 16481
  • ASP RSS
Apr 21st, 2004
0

Help on ASP pages parameters transfer

Expand Post »
Hi, I'm a newbiew in ASP, but find it very fun.

I 'm now designing code for data validation using VBScript at server side, instaead of a javascript client side approach.

I use an asp page (asp1) to verify the data validity, and do some additional reformating, meanwhile. ( for instance, if submited phone number 1234 5678 90--->(123) 456-7890). If the submitted data are valid, and reformatting are done, the data is then sent to another ASP page(asp2) to for further processing.

My question is asp1 not only verify data, but also have made some data modification(reformating). Therefore, asp2 needs not only the request forwarded by asp1, but also reformatted data. I wonder if ASP technology allows an asp page to add some fileds to the request scope, before pass the control to the next asp page.

Server.transfer(asp2)

Thanks,

:cheesy:
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mengDaniWeb is offline Offline
1 posts
since Apr 2004
Apr 21st, 2004
0

Re: Help on ASP pages parameters transfer

Once you have submitted data to a page (asp1), you will need to rebuild the output to (asp2). There are a few ways to do this, I will show you two that you can use in ASP1.

The First:

ASP Syntax (Toggle Plain Text)
  1. <%
  2. 'Error Checking and reformatting here
  3. ...
  4.  
  5. Response.Redirect "/directory/asp2.asp?name=" & myName & "&email=" & myEmail & "&phone=" & myPhone
  6. %>


The first method allows you to redirect the results of error checking and reformatting using the Response.Redirect statement.

The Second:

ASP Syntax (Toggle Plain Text)
  1. <%
  2. 'Error Checking and reformatting here
  3. ...
  4.  
  5. %>
  6. <BODY onLoad="document.frmForward.submit();">
  7. <FORM method="post" name="frmForward" action="/directory/asp2.asp">
  8. <input type="hidden" name="myName" value="<%= myName %>">
  9. <input type="hidden" name="myEmail" value="<%= myEmail %>">
  10. <input type="hidden" name="myPhone" value="<%= myPhone %>">
  11. </FORM>
  12. </BODY>

The second method allows you to secure the forwarded data using post and still achieves the same goal. But make sure all error checking and reformatting happens before the Body onLoad statement fires!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
DVHost is offline Offline
20 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Reading MSWord Document through an ASP Statement
Next Thread in ASP Forum Timeline: Creating ASP with ASP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC