Your question has been submitted and is awaiting moderation.
I'm trying to set set some cookies in a skin control I made in /admin/Skins that I include in my skin template. I create the cookie using the code:
Response.Cookies["UserSiteSettings"]["CookieName"] = "cookie value";
As I would any other cookie, and I only set the cookie if it doesn't already exist. I set the expirey date to 1 day. Every time I load the page, it acts as if the cookie never existed, so it's always triggering the "if cookie == null" code, and sets the expirey to 1 day form loading the page.
What I'm trying to do is set a cookie when a user first visits the site and be able to call that cookie if it exists. At the moment every time I load the page, it doesn't recognise the cookie I set.
Is there a particular way to set cookies in DNN?
I'm using DNN 7.1.2 Community