473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 6237
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. Response.Redirect...
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.. response.redirect...
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 pages, each page contains a common .ascx. This ascx...
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 clears out the Data and then redirects to the same...
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 this, but im stuck here... Dim strURL As String...
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 work with Internet Explorer, however when using...
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 filter class to write it out. the problems start...
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) provided at the university I work for. Each page checks...
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 requests by bassing the ASPSESSIONID cookie through the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.