error message

Results 1 to 2 of 2

Thread: error message

  1. #1
    Join Date
    Dec 1969

    Default error message

    Hello,<BR><BR>I don&#039;t understand this error message:<BR><BR>Response object error &#039;ASP 0156 : 80004005&#039; <BR><BR>Header Error <BR><BR>/intranet_BDG/KeyFobSearch.asp, line 36 <BR><BR>The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content. <BR><BR>I am simply calling info from an access database and then I want it to redirect to another page if the info can&#039;t be found. So I have at the end of my page :<BR>&#060;%else<BR>response.redirect "KeyFobNo.asp"<BR>%&#062;<BR><BR>But then I get that error message. If I put:<BR>&#060;%else<BR>response.write "Info can&#039;t be found"<BR>%&#062;<BR>It works, so why not with response.redirect.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: error message

    Once you write ANYTHING to the page, you can no longer use response.redirect. You can have server-side processing code, but once a character has been actually written, no more response.redirect. You can either:<BR><BR>1. Write stuff out AFTER you have determined a response.redirect isn&#039;t necessary, or <BR>2. Call a JavaScript function using window.location.href=&#039;mypage.asp&#039;;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts