Response.Redirect() from aspx to asp

Hi,

can i use the Response.Redirect() to redirect the page to classic ASP page form ASP.NET. and pass in the parameters from the aspx to ASP
like this
Response.Redirect("send_new_broker_email.asp?email_address="+ txtEmailAddress.Text);
if so what if i want to pass multiple variables.
jemigossayeAsked:
Who is Participating?
 
mcgantsConnect With a Mentor Commented:
the difference between server.transfer and response.redirect is that response.redirect simply sends a message to the browser telling it to go to another page. Server.transfer, however, changes the focus on the server and transfers the request. This means the original URL sits in the browser address bar, and by setting the preserveForm atttribute to true, you can actually use values from elements on the previous page!
The down side to server.transfer is you can only redirect to pages on the same server. Also, the preserveForm feature isn't without it's bugs!

I'm off for the night now, so hope this helps,
mcg
0
 
aki4uCommented:
yes, you can...if you pass multiple variables - is the same as if you were passing one variable
0
 
mcgantsCommented:
deal with multiple variables by adding an ampersand between variables:
Response.Redirect("send_new_broker_email.asp?email_address="+ txtEmailAddress.Text +"&var2="+ txtvar2.text);
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
jemigossayeAuthor Commented:
hi, after when I redirect to the CLASSIC ASP page from ASP.NET I n getting this error:


This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden.  The extension '.asp' may be incorrect.   Please review the URL below and make sure that it is spelled correctly.

Requested URL: /BrokerInfo/send_new_broker_email.asp
 ps it is spelled correctly.
0
 
mcgantsCommented:
are you running IIS6 under windows server 2003? If so, run inetmgr to open IIS and check that Active Server Pages are allowed  the 'Web Service Extensions'

otherwise, check that it's asp pages, not aspx pages you're trying to run.

cheers,
mcg
0
 
jemigossayeAuthor Commented:
well thanks,

one more thing what about server.transfer() would I be abel to use that to do the same thing.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.