Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use Response.Redirect?

Status
Not open for further replies.

hxx

Technical User
Oct 26, 2000
10
MY
if user chooses condition 1 and 2, he would move to form A.
otherwise, if he chooses condition 3 and 4, he would move to form B.
how to use response.redirect to do this? or is there any other way to implement this?
 
for one, the page must have <% Response.buffer = True %> at the top, and you must not send back or flush the buffer prior to a redirect otherwise you'll get an error, if you end up not redirecting at all use Response.Flush, then Response.end to end the page, and show it's content, otherwise Response.Redirect URLHere, then Response.end after it so it doesnt continue to process the rest of the page.

Karl
kb244@kb244.com
Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)

 
hi hxx,

hope this helps..

<%
select case error
Case 1: Response.Redirect(&quot;formA.asp&quot;)
Case 2: Response.Redirect(&quot;formA.asp&quot;)
Case 3: Response.Redirect(&quot;formB.asp&quot;)
Case 4: Response.Redirect(&quot;formB.asp&quot;)
end select
%>
----------------------------------------------------
or if they are in the same page, bookmark it then
<%
select case error
Case 1: Response.Redirect(&quot;page.asp#formA&quot;)
Case 2: Response.Redirect(&quot;page.asp#formA&quot;)
Case 3: Response.Redirect(&quot;page.asp#formB&quot;)
Case 4: Response.Redirect(&quot;page.asp#formB&quot;)
end select
%>


Chiu Chan
cchan@gefmus.com
 
why there is error message &quot;object doesn't support response.redirect&quot;....anything wrong? any additional declaration required?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top