Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie Question

Status
Not open for further replies.

raa44634

Technical User
Dec 13, 2001
34
US
I just can't see what I'm doing wrong here.

On Page1.asp, I need the cookie to capture the value of a text boxed name "txtABC".

On Page3.asp, I need to bring up that cookie and have the value show in the body.

How do I do this? I cannot seem to capture the value of the textbox. My syntax is on Page1 is
<% Response.Cookies(&quot;Add&quot;) = Request.Form(&quot;txtABC&quot;)
Response.Cookies(&quot;Add&quot;).Expires = DateAdd(&quot;d&quot;, 1, Date) %>

On Page3 I have:
Value: <% Response.Write Request.Cookies(&quot;Add&quot;) %>

Thanks!
 
Do you have any error handling on this page? If you have the line &quot;On Error Resume Next&quot; at the top of the page, you can comment that line out so you can see if any errors are occurring. That's usually my first step when trying to find out why something isn't working. It doesn't always work, but it's worth a shot.

Your code looks fine...if no error is displayed, you may want to try commenting out the expiration line on page1. If it works after that, at least you've narrowed it down to that particular line.

I hope this helps.
Rich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top