User1389508859 posted
Hey there,
I thought I had this but what I have currently only works if the browser does not close.
What I am trying to do is keep a continuous track record of how many individuals have successfully completed and submitted a survey. The survey itself was created using the Wizard tool in VS Studio Express, Web (2012). The values are getting successfully
stored in a database, however the survey count number does not increment as expected.
I think I'm on the right track - obviously just missing the part where the value stays whether the browser remains opened or closed.
Hopefully that makes sense; my code is below.
// Count survey number
if (Application["lastSurveyCount"] != null)
{
int curSurveyCount = Convert.ToInt16(Application["lastSurveyCount"]) + 1;
Session["surveyCount"] = curSurveyCount.ToString();
}
else
{
Application["lastSurveyCount"] = 1;
Session["surveyCount"] = Application["lastSurveyCount"];
}
Tips and/or advice?
** Edit: Upon doing more research, I see PROFILES may be the ticket, however much more complicated. Are there simpler ways?