p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: response.redirect

Message #1 by "Neethling, Dirk HTC/DE/EIC" <Dirk.Neethling2@h...> on Wed, 14 Mar 2001 22:47:53 +0100
<P>You have not defined the whole error. If you are getting Header ERROR upon using response.redirect, then u need to set
Response.Buffer= true, like</P>
<P>Response.Expires = 60<BR>Response.Expiresabsolute = Now() - 1<BR>Response.AddHeader
"pragma","no-cache"<BR>Response.AddHeader "cache-control","private"<BR>Response.CacheControl =
"no-cache"<BR>Response.Buffer= true               
' set this to true and it'll work if its an header error.</P>
<P>That's all I can say. Good luck</P>
<P><BR><BR> </P></DIV>
<DIV></DIV>>From: "Neethling, Dirk HTC/DE/EIC" <DIRK.NEETHLING2@H...>
<DIV></DIV>>Reply-To: "Code Clinic" <PROASP_CODECLINIC@P...>
<DIV></DIV>>To: "Code Clinic" <PROASP_CODECLINIC@P...>
<DIV></DIV>>Subject: response.redirect 
<DIV></DIV>>Date: Wed, 14 Mar 2001 22:47:53 +0100 
<DIV></DIV>>I'm having problems with a simple response.redirect, keep getting 'ASP 0113' 
<DIV></DIV>>. The web-server setting allows for buffering n the project. Could someone 
<DIV></DIV>>comment please? 
<DIV></DIV>>The code: 
<DIV></DIV>>Response.Expires = 60 
<DIV></DIV>>Response.Expiresabsolute = Now() - 1 
<DIV></DIV>>Response.AddHeader "pragma","no-cache" 
<DIV></DIV>>Response.AddHeader "cache-control","private" 
<DIV></DIV>>Response.CacheControl = "no-cache" 
<DIV></DIV>> dim cnn1 
<DIV></DIV>> Set cnn1 = server.CreateObject("ADODB.Connection") 
<DIV></DIV>> cnn1.ConnectionString = Session("cnn") 
<DIV></DIV>> cnn1.Open 
<DIV></DIV>> dim tmpStr, sqlStr, Vtype 
<DIV></DIV>> dim innenschale_tunnel, innenschale_block, innenschale_bauteil, uzr 
<DIV></DIV>> uzr = Request.QueryString("user") 
<DIV></DIV>> innenschale_tunnel = Request.QueryString("innenschale_tunnel") 
<DIV></DIV>> innenschale_block = Request.QueryString("innenschale_block") 
<DIV></DIV>> innenschale_bauteil = Request.QueryString("innenschale_bauteil") 
<DIV></DIV>> sqlStr = "UPDATE users SET innenschale_tunnel='" & 
<DIV></DIV>>innenschale_tunnel & "', innenschale_block='" & innenschale_block & "', 
<DIV></DIV>>innenschale_bauteil='" & innenschale_bauteil & "' WHERE username = '" & uzr 
<DIV></DIV>>& "'" 
<DIV></DIV>> Vtype = Request.QueryString("VType") 
<DIV></DIV>> if innenschale_tunnel <> "" then 
<DIV></DIV>> cnn1.Execute sqlStr 
<DIV></DIV>> end if 
<DIV></DIV>> cnn1.Close() 
<DIV></DIV>> set cnn1 = nothing 
<DIV></DIV>> Response.Redirect "menuInnenschale.asp?innenschale_tunnel=" & 
<DIV></DIV>>innenschale_tunnel & "&innenschale_block=" & innenschale_block 
<DIV></DIV>>& "&innenschale_bauteil=" & innenschale_bauteil 

  Return to Index