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:

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.