# ASP Cookies...need a little help

**URL:** https://forum.kirupa.com/t/asp-cookies-need-a-little-help/124634
**Category:** Uncategorized
**Created:** [October 5, 2004, 2:28pm UTC](https://forum.kirupa.com/t/asp-cookies-need-a-little-help/124634 "2004-10-05T14:28:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RabBell](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rabbell/32/340_2.png) [@RabBell](https://forum.kirupa.com/u/RabBell)
#### Post date: [October 5, 2004, 2:28pm UTC](https://forum.kirupa.com/t/asp-cookies-need-a-little-help/124634/1 "2004-10-05T14:28:25Z")

</div>

Ok heres the problem

I have 3 pages. The first page has 2 buttons, one says buy tickets, the other says no tickets. Clicking on either one will send a parameter and the browser to the second page which creates a cookie and stores the parameter in there.

Now if I wanted to view this cookie in the second page I’d be able to see it but I don’t. I want to see it in the third page and thats when I get an Internal Server error message…

Eventually page 2 & page 3 will be on different servers. Here is the code in the second page

> \<% dim lgreet,lvalue

```
lvalue = request.QueryString("TickNum")
if lvalue="" then lvalue="0"
lvalue=lvalue*1
Response.Cookies("RobertTicket")=lvalue
response.write "Cookie created and set"

```

%\>  
\<html\>  
\<head\>  
\<title\>Untitled Document\</title\>  
\<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”\>  
\<script language=“JavaScript”\>  
{  
function Next(){  
self.location.href = “ViewCookie.asp”  
}  
}  
\</script\>  
\</head\>

\<body\>  
\<a href=“Javascript:Next()”\>Next\</a\>  
\</body\>  
\</html\>

As I said this works fine but if I click next to go to viewcookie.asp (page 3) I get the error. Here is page3’s code

> \<% If Request.Cookies(“RobertTicket”) = 1 Then  
> greet = “Tickets bought”  
> Else  
> greet = “No tickets”  
> End If  
> Response.Write greet  
> %\>  
> \<html\>  
> \<head\>  
> \<title\>Untitled Document\</title\>  
> \<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”\>  
> \</head\>

\<body\>

\</body\>  
\</html\>

Any help is appreciated :beam:
