Board index » delphi » Small thing that i can't fix - cookie related

Small thing that i can't fix - cookie related

I know this is an easy thing, but I have tried loads of things..

I have an action that sets a cookie..

when I do it like this

    with Response.Cookies.Add do
    begin
      Name := 'AID';
      Value := putout;
      Expires := Now + 30; { this cookie expires in 30 days }
      Secure := false;
      Path := '/';
      Domain := Request.Host;
    end;

    Response.Content := 'Some text here';

works like a dream, I can read the cookie back... Fine

when I do this....

Response.SendRedirect(RedirURL);

No cookie is set..  

Any way round this??

N

 

Re:Small thing that i can't fix - cookie related


I have tried both, with and without Handled := true; and handled := false;

??

Quote
"Nathan" <BorlandNewsgro...@highstreet.net> wrote:

>I know this is an easy thing, but I have tried loads of things..

>I have an action that sets a cookie..

>when I do it like this

>    with Response.Cookies.Add do
>    begin
>      Name := 'AID';
>      Value := putout;
>      Expires := Now + 30; { this cookie expires in 30 days }
>      Secure := false;
>      Path := '/';
>      Domain := Request.Host;
>    end;

>    Response.Content := 'Some text here';

>works like a dream, I can read the cookie back... Fine

>when I do this....

>Response.SendRedirect(RedirURL);

>No cookie is set..  

>Any way round this??

>N

Other Threads