Do something if survey has be done.

Developer
Jun 22, 2008 at 10:53 AM
Hello Steve,
Is is possible to get information, that survey was done without using cookie? After user has done survey I need send file into database. But after last post back make control redirect to another page.

Regards
AKa
Coordinator
Jun 24, 2008 at 4:59 AM
Do you mean you want to know that a particular survey was previously completed or that you want to know when the finish button was clicked?

It would probably be possible to add in a hook to listen for when the Finish button was actuated, but the only way (at present) to tell if someone has previously taken a survey is via cookies.

-Steve
Jul 3, 2008 at 3:32 AM


aka wrote:
Hello Steve,
Is is possible to get information, that survey was done without using cookie? After user has done survey I need send file into database. But after last post back make control redirect to another page.

Regards
AKa


I wanted to achieve this as well.  I added a line to Steve's "WebSurvey.cs" to prevent a redirect:

                if (m_strRedirectUrl != "")  // new line
                    HttpContext.Current.Response.Redirect(m_strRedirectUrl);

With this change, I can now check IsPostBack and IsValid to see if the survey was completed in the last post back.  This isn't necessarily a perfect solution, but might work for you as well.

Bill