472,327 Members | 1,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,327 software developers and data experts.

Response.Clear with a Response.Redirect

The Microsoft site has confused me on this issue:
http://www.microsoft.com/technet/pro....mspx?mfr=true

Says that:
"ASP automatically discards any existing output in the buffer when you
call Response.Redirect "

But then the code example has a Response.Clear in, i.e.

If Err.Number 0 Then
Response.Clear
Response.Redirect "./error.mspx"
End If

Does anyone know whether a Response.Clear is needed or not? Or does it
vary on different versions?

Thanks.

Nov 4 '06 #1
1 5922
wrote on 04 nov 2006 in microsoft.public.inetserver.asp.general:
The Microsoft site has confused me on this issue:
http://www.microsoft.com/technet/pro...erv/reskit/iis
book/c06_redirection.mspx?mfr=true

Says that:
"ASP automatically discards any existing output in the buffer when you
call Response.Redirect "

But then the code example has a Response.Clear in, i.e.

If Err.Number 0 Then
Response.Clear
Response.Redirect "./error.mspx"
End If

Does anyone know whether a Response.Clear is needed or not? Or does it
vary on different versions?
Read the text on that page:
"If you dont know at the beginning of the page whether you need to
redirect, you can use the buffering capabilities of the Response object. If
Response.Buffer is True, HTML output is collected in a buffer and sent all
at once to the client. If at some point you need to redirect to another
page, ASP automatically discards any existing output in the buffer when you
call Response.Redirect. You may also use Response.Clear at any time to
clear the buffer and start again."

"... start again." ???
The last sentence perhaps belongs on another spec page, and the MS specs
writers are cached22 in their own copy and pasting?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul | last post by:
I'm not getting the results I want when I use Response.Redirct in a ASP page. I enter this line of code in a asp page from domain1.com. ...
2
by: Tim | last post by:
response.redirect seems to urlencode a querystring thrown across at it.. is there a way to disable this function that anyone knows of? ie.....
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx...
6
by: DotNetGruven | last post by:
I've got a page that does a search... There is an ImageButton on it that allows the user to reset the search. The Click Handler for the button...
4
by: Rothariger | last post by:
Hello, i have a problem, i must to make a response.redirect, with a fixed header (authentication header) but i dont know how to do it... i make...
15
by: KBuser | last post by:
I recently developed an internal website with various queries against our SQL server. I added buttons with Response.Redirect. These buttons do not...
1
by: ocbka1 | last post by:
i'm using creating a webpage on the fly that i save as an xls file to be attached to an email and sent dynamically. i've got a custom response...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS)...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.