Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 8th, 2003, 09:06 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default repsponse.redirect problem

I have some really weird things going on.

First here's my code:

<% Response.Redirect "loggedout.asp" %>

Yep that's it.

This code is in the page root/admin/index.asp

If I try to browse to root/admin/index.asp, the browser just sits there forever and my dial-up connection shows that a ton of activity is going on (sending and receiving) but it never loads the page. If I remove that code, it loads the page no problem.

Next if I try to browse to just root/admin, the redirect sort of works, but it redirects it to the root directory, not the root/admin directory.

Of course as a programmer, I think that it may be a server problem or something. I am on an IIS server if that makes any difference. Any ideas as to what the heck is wrong?

Thanks!

Ray
  #2 (permalink)  
Old June 8th, 2003, 10:48 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Ray-

A redirect will only work if nothing else was written out to the browser.

Are you sending data to the page first and then doing a response.redirect? If so you need to set Response.Buffer = True and then Response.Flush when your ready for everything to happen.




Hal Levy
Daddyshome, LLC
  #3 (permalink)  
Old June 8th, 2003, 01:21 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is the code for my entire page.

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Empty test page</title>
</head>

<body>

<% Response.Redirect "loggedout.asp" %>

</body>

</html>
  #4 (permalink)  
Old June 8th, 2003, 02:02 PM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Get rid of all the HTML markup. The only thing that should be on the page is the

Code:
<% Response.Redirect "loggedout.asp" %>
None of the <BODY> and other HTML markup. That's all stuff that gets sent to the browser before the redirect, and therefore the browser doesn't know how to handle it.



Hal Levy
Daddyshome, LLC
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Repone.Redirect() problem aliirfan84 ASP.NET 2.0 Professional 4 June 13th, 2007 08:29 AM
Response.Redirect Problem msbsam ASP.NET 2.0 Basics 0 February 10th, 2007 03:28 AM
Problem with redirect/replace gorros Javascript 4 March 11th, 2006 07:37 AM
problem with redirect.. joeore PHP Databases 2 February 17th, 2004 02:54 PM



All times are GMT -4. The time now is 04:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.