Home All Groups Group Topic Archive Search About


Author
16 Mar 2005 1:49 PM
Athmaus
I have a techincal support form. And when the user hits submit i want to give
them a cookie. When they try to access this page again in a 24-48 hour time I
want the page to identify the cookie and redirect them to an alternative
page. Yet i am having a problem with the page.

Here is my code for the to give the cookie:

Dim prod
prod = "test"

Response.Cookies("testing")= prod
Response.Cookies("testing").Expires = Date + 1



Here is the code to read the cookie:

dim show, verify

verify = "test"

show = Request.Cookies("testing")

If verify = show
    Then Response.Redirect  "http://www.google.com"

End If


Any suggestions?

Thanks!

Author
16 Mar 2005 6:58 PM
Curt_C [MVP]
what is the problem specifically? Are cookies enabled on the client?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


Show quote
"Athmaus" <Athm***@discussions.microsoft.com> wrote in message
news:31D8F744-FD7E-49AB-B4AD-DA10E2CF769F@microsoft.com...
>I have a techincal support form. And when the user hits submit i want to
>give
> them a cookie. When they try to access this page again in a 24-48 hour
> time I
> want the page to identify the cookie and redirect them to an alternative
> page. Yet i am having a problem with the page.
>
> Here is my code for the to give the cookie:
>
> Dim prod
> prod = "test"
>
> Response.Cookies("testing")= prod
> Response.Cookies("testing").Expires = Date + 1
>
>
>
> Here is the code to read the cookie:
>
> dim show, verify
>
> verify = "test"
>
> show = Request.Cookies("testing")
>
> If verify = show
> Then Response.Redirect  "http://www.google.com"
>
> End If
>
>
> Any suggestions?
>
> Thanks!
>
>
Author
16 Mar 2005 10:49 PM
Athmaus
I couldnt give a "specific" problem becasue my debugger on IIS was messed up.
Once they got it up and running agin i foudn the problem.

I forgot to put an "End If" in once section since adding the reponse.cookie
and than i had to chnage how to obatain the date by using the DateAdd()
function.

Show quote
"Curt_C [MVP]" wrote:

> what is the problem specifically? Are cookies enabled on the client?
>
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Athmaus" <Athm***@discussions.microsoft.com> wrote in message
> news:31D8F744-FD7E-49AB-B4AD-DA10E2CF769F@microsoft.com...
> >I have a techincal support form. And when the user hits submit i want to
> >give
> > them a cookie. When they try to access this page again in a 24-48 hour
> > time I
> > want the page to identify the cookie and redirect them to an alternative
> > page. Yet i am having a problem with the page.
> >
> > Here is my code for the to give the cookie:
> >
> > Dim prod
> > prod = "test"
> >
> > Response.Cookies("testing")= prod
> > Response.Cookies("testing").Expires = Date + 1
> >
> >
> >
> > Here is the code to read the cookie:
> >
> > dim show, verify
> >
> > verify = "test"
> >
> > show = Request.Cookies("testing")
> >
> > If verify = show
> > Then Response.Redirect  "http://www.google.com"
> >
> > End If
> >
> >
> > Any suggestions?
> >
> > Thanks!
> >
> >
>
>
>

AddThis Social Bookmark Button