Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 4th, 2006, 10:08 AM
Authorized User
 
Join Date: Aug 2005
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trouble with cookies

I have a link list that I create with repeater from a database table.
The menu is like
English
FInnish
Swedish

In the database english have id 1 and finnish id 2 and sve id 3
Now I would want to put the id number into a cookie. I Have tried with this
<a href='<%#Response.Cookies("LangID").value =%>' & '<%#language.FieldValue("LangID", Container) %>'>
 <%# language.FieldValue("Languages", Container) %></a>

How should I write that I wouldn't get error?
And than to last I want to redirect to another page
 
Old February 4th, 2006, 10:59 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You should be using a postback control (button or linkbutton) that then creates the cookie object that you pass to Response.Cookies.Add(). Then do a Response.Redirect().

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Cookies hastikeyvan Classic ASP Professional 5 May 29th, 2006 07:36 AM
Should I use cookies?? Help Tee88 Classic ASP Basics 3 January 21st, 2005 12:33 AM
Cookies cjo ASP.NET 1.0 and 1.1 Basics 1 November 8th, 2003 02:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.