Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsSurveySurveyExpire cookie in 24 hoursExpire cookie in 24 hours
Previous
 
Next
New Post
1/17/2011 4:10 PM
 
We would like to be able to have our website vistors be able to answer the same survey once each day (we're actually using for voting).

Is there anyway to have set the cookie that Survey places on the users system to expire in 24 hours?

Thanks.

Jim
 
New Post
1/17/2011 5:20 PM
 
I did a little checking and it appears that the following would set the cookie within in the VB code to expire in 24 hours:

' Set value of cookie to current date time.
cookie.Value = DateTime.Now.ToString()
' Set cookie to expire in 1440 minutes or 24hours
cookie.Expires = DateTime.Now.AddMinutes(1440)

But, I haven't got access to VB to modify the code -- not that I would feel comfortable doing it in the first place ;-)

Thanks for any suggestions anyone might be able to offer.

Jim
 
New Post
1/17/2011 8:44 PM
 
From looking at the VB source code for the survey module, it appears that changing the following line of code:

objCookie.Expires = DateTime.MaxValue

to:

objCookie.Expires = Date() + 1

Would set the cookie to expire one day from the day the cookie is set.

That sound right?
 
New Post
1/17/2011 9:07 PM
 
That should work.


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
1/17/2011 10:32 PM
 
Excellent!

Now -- if I could just get a kind soul that has VB to tweak that line of code and re-compile the Survey.ascx.vb module for me (just search for the "' never expires" comment in the code ;-)

Thanks in advance for any offers of assistance!
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsSurveySurveyExpire cookie in 24 hoursExpire cookie in 24 hours


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out