I’m creating a group of surveys that query Salesforce (salesforce.com CRM) to generate survey questions dynamically.
The survey layouts are determined by a record type that gets passed in the QueryString. The page queries Salesforce and aggregates the questions/fields it should be using. Then it creates questions and adds them to a panel.
When I open one survey, things look great, and they work as designed. But on opening a separate survey, of a different type, the questions from the first survey are still in the questions panel, as if they are cached somewhere.
To see what I mean, open “Survey 1”. Then open “Survey 2” in a new tab. Now re-open “Survey 1”, but this time do it in a new tab. Compare the first “Survey 1” to the second “Survey 1”, and you’ll see that the second “Survey 1” has the questions from “Survey 2” added into it.
Survey 1: Cancelled Appt: http://www.nationallandpartners.com/survey/?sid=a0RT0000000HPV2&type=012T0000000CwKx
Survey 2: Purchased: http://www.nationallandpartners.com/survey/?sid=a0RT0000000HHLk&type=012T0000000Cvr7
Survey 3: Toured, Didn’t Buy: http://www.nationallandpartners.com/survey/?sid=a0RT0000000HQQk&type=012T0000000CwPi
Is there something - or a way that - I should be clearing variables, public variables, sessions, or page/panel caches on every page load?
I define the array where the fields/questions are aggregated like this:
public partial class _Default : System.Web.UI.Page
{
private static ArrayList field_names_use = new ArrayList { };