|
-
Apr 2nd, 2001, 05:38 PM
#1
Thread Starter
Lively Member
I am trying to redirect a user and sending a querystring as well. I have formated the data to be send and tried to build a string. I get an error. The code is below:
Sub Back2Form
Form_Caption = Server.URLEncode(Form_Caption)
Form_Recipient = Server.URLEncode(Form_Recipient)
Form_Content = Server.URLEncode(Form_Content)
Form_Author = Server.URLEncode(Form_Author)
Val_Chk = Server.URLEncode(Val_Chk)
Val_Caption = Server.URLEncode(Val_Caption)
Val_Recipient = Server.URLEncode(Val_Recipient)
Val_Content = Server.URLEncode(Val_Content)
Val_Author = Server.URLEncode(Val_Author)
Response.Redirect "/newsInput.asp?FrmCap=" & Form_Caption & "&frmRec=" & Form_Recipient & "&frmCont=" & Form_Content
End Sub
The error is as follows:
Response object error 'ASP 0156 : 80004005'
Header Error
/Test/newsPost.asp, line 30
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
What am I doing wrong?
Thank you,
Coopetj
-
Apr 3rd, 2001, 03:29 AM
#2
Fanatic Member
Hi coopetj
Basically your problem is that you have written some content to the client and are then trying to re-direct to another page which the server doesn't let you. To get around this problem, use the buffer feature to compelte all scrpt before writting to the page. Use response.buffer = True
Hope this helps
Ian
Last edited by Ianpbaker; Apr 3rd, 2001 at 03:35 AM.
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Apr 3rd, 2001, 04:13 PM
#3
Thread Starter
Lively Member
What I did is put the code before any HTML code. Since it was a sub it didnt matter where I put it.
Thank you for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|