Umbraco & Cookies Options
VirtualRichard
Posted: Tuesday, February 12, 2008 5:24:12 PM

Rank: Fanatic

Joined: 9/17/2007
Posts: 202
Location: London, UK.
Hello,

Can I set a cookie within Umbraco? I want people to go to a page with two links but when they choose a link, umbraco will go directly to the chosen link on subsequent visits without having to click the link.

I know there's a library entry to read a cookie value but what about setting a cookie that will persist (not session)? I can't see an equivalent function.

Thanks!

Richard


2 * 3 * 3 * 37 : The prime factorisation of The Beast.
cpalm
Posted: Tuesday, February 12, 2008 5:31:36 PM

Rank: Aficionado

Joined: 7/19/2006
Posts: 155
There is a library method you can use
setCookie(string key, string value)

Sets a cookie for a month

CPalm, www.cpalm.dk
VirtualRichard
Posted: Tuesday, February 12, 2008 5:34:52 PM

Rank: Fanatic

Joined: 9/17/2007
Posts: 202
Location: London, UK.
Thanks for that. I didn't see that in the online API.

What if I want to set it for longer? Ideally, I'd want it to be indefinite.

Richard


2 * 3 * 3 * 37 : The prime factorisation of The Beast.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.