This project is read-only.

PreviouslyCompleted return always "false"

Apr 4, 2008 at 12:41 PM
I've a simple survey with only a group of questions and it's redirect to a stats page using your XSLT file transformation. I'm using codebehind page and PreviousCompleted method reutrn always false.
Any suggestion?
Apr 9, 2008 at 5:57 AM
At what point in the page load cycle are you checking the .PreviouslyCompleted property?

Try doing it in Page_PreRender if you're not already.

Apr 12, 2008 at 10:41 AM
Hello Steve!

Great work with this survey module.
I'm having the same issue as Rpruno: I was using the Page_Load event with the test

if (ws.PreviouslyCompleted) {
pnlPreviouslyCompleted.Visible = true;
pnlSurvey.Visible = false;
} else {
pnlSurvey.Visible = true;
pnlPreviouslyCompleted.Visible = false;

But the pnlPreviouslyCompleted was never shown. In debug mode I saw that, after I press the finish button, it executed twice the page_load: the first time PreviouslyCompleted was true but in the second it was false!

Using Init, InitComplete, LoadComplete Page_PreRender both times were false.

Can you please help me on this?
Thanks in advance,

Ricardo Pinto.
Apr 12, 2008 at 6:05 PM

Here is the code that I'm using in the TestHarness, which I believe is working:

        public void Page_PreRender(Object sender, EventArgs e)
            if (!Page.IsPostBack)
                if (ws.PreviouslyCompleted)
                    pnlSurveyPreviouslyCompleted.Visible = true;
                    pnlSurvey.Visible = true;

Does that not work for you?