User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 391,616 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,673 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 10215 | Replies: 1
Reply
Join Date: Apr 2004
Posts: 1
Reputation: mengDaniWeb is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mengDaniWeb mengDaniWeb is offline Offline
Newbie Poster

Help on ASP pages parameters transfer

  #1  
Apr 21st, 2004
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:
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Location: Louisville, KY
Posts: 20
Reputation: DVHost is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
DVHost's Avatar
DVHost DVHost is offline Offline
Newbie Poster

Re: Help on ASP pages parameters transfer

  #2  
Apr 21st, 2004
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:

<%
'Error Checking and reformatting here
...

Response.Redirect "/directory/asp2.asp?name=" & myName & "&email=" & myEmail & "&phone=" & myPhone
%>



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

The Second:

<%
'Error Checking and reformatting here
...

%>
<BODY onLoad="document.frmForward.submit();">
<FORM method="post" name="frmForward" action="/directory/asp2.asp">
  <input type="hidden" name="myName" value="<%= myName %>">
  <input type="hidden" name="myEmail" value="<%= myEmail %>">
  <input type="hidden" name="myPhone" value="<%= myPhone %>">
</FORM>
</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!
The Big Dog, Bites Hard!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 12:27 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC