Redirect Cookies problem

Results 1 to 2 of 2

Thread: Redirect Cookies problem

  1. #1
    Corin Guest

    Default Redirect Cookies problem

    I am using aspupload to load images, thus I cannot use request statements on the form handling page. I use Upload.Form rather than request.form which seems to work great. However I then move those values to cookies with Response.cookies("name")("name2")= myValue and this seems to work fine.<BR><BR>The problem is when I move to the next page and attempt to retrieve the cookie.<BR><BR>If I use ASP response.redirect "nextpage.asp" my string is limited to about 500 characters as I get an 500 error. If I use javascript location.href = "nextpage.asp" I can&#039t access the cookies on the next page. On the next page I use;<BR><BR>myValue = request.cookies("name")("name2")<BR>Response.write myValue & "<BR>"<BR><BR>and get nothing when using the javascript redirect.<BR><BR>I don&#039t know why this does not work and it does not seem to make sense.<BR><BR>Any help is appreciated

  2. #2
    Join Date
    Dec 1969

    Default RE: Redirect Cookies problem

    don&#039t redirect. do the operation of the next page in the set cookie page (or vice versa)<BR><BR>to set a cookie, you need a valid, complete HTTP response, meaning you can&#039t response.redirect, and this may well apply to javascript redirects before the page completes (dependent on browser). I set cookies in &#039thank you&#039 pages rather than in scripts, it&#039s more reliable<BR><BR>j

Posting Permissions

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