ID

Uploaded

Status

Description

Work Items

Action

13791
by cadry
Feb 4, 2013
6:16 PM

Being evaluated

Here are some modifications we made so we could save our questionnaire results to a SQL Server 2008 database and integrate the control into our ASP.NET Web Forms/VB.NET application.

Changes:

If the properties supplying image paths are omitted from a Group definition in the survey.xml file (or set to ""), it falls back to using regular ASP.NET buttons with the text "Back", "Next" or "Submit" as appropriate.

Added an event and two new properties to the control to allow us to save to a database:
WriteAnswersToXMLFile (True/False) allows us to stop it writing the answers to an XML file on the server.
AnswerSet is an XML element containing the list of question answers at survey completion time.
The custom SurveySubmit event can be handled by the containing page as it is the notification that the AnswerSet is available to be saved to the database (or whatever other persistence layer you want to plumb in)

Changed handling of the 'redirecturl' property on the control so it can be made to stay on the same page after Submit is clicked. If the value is blank or the property not specified in the survey XML file it stays on the same page. This is desirable behaviour if you are capturing the results and writing to a database in your page's code, as you can check if the Save action succeeded or not and report an appropriate message to the user.

Changed default validation message to "* Answer required" instead of "*" as it stands out better on the page.

Download

5649
by DotNetHacker
Mar 31, 2010
11:14 AM

Being evaluated

Added the following line to the attached file:
if (m_listControl.Items.Count > 0)
m_listControl.Items[0].Selected = true;

If Required is enabled then the first item in the list will be selected by default.

Download

1834
by billvo
Sep 15, 2008
8:49 PM

Being evaluated

This is a sample ASP.NET VB project showing the use of "SurveyDocument" and "AnswersDocument" XmlDocuments exposed by the modifications I proposed. In this example the user chooses at run time the survey to be answered. XmlDocument is prepared by XmlDocument.Load, and passed to WebSurvey. This still works from .XML files. I've also provided SQL Server schema, data, and stored procedure to generate XML from relational tables.

Download

1659
by billvo
Aug 11, 2008
8:37 PM

Being evaluated

Exposes XmlDocuments for procedural access so that XML files need not be read and written by WebSurvey. This allows your code to draw your questions from a SQL database and pass them to WebSurvey as an XmlDocument without touching the file system. Likewise, answer output from WebSurvey is prepared as an XmlDocument for your code to read.

I did this because my survey will be used over and over again by the same users, and there are many of them. I didn't want to have lots of files scattered about.

Download

View All
  • 1-4 of 4 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches