Survey Forums

HomeHomeSurvey Project ...Survey Project ...GeneralGeneralHow do i implement a survey created in the "survey project" engine in a seperate asp.net web site?How do i implement a survey created in the "survey project" engine in a seperate asp.net web site?
Previous
 
Next
New Post
1/28/2011 8:20 PM
 

Hi,

I used the survey project engine to create a custom survey. At the end i went to the "asp.net code" section & copied the code  & the directive into a new asp.net application. I then added a reference to the Votations.NSurvey.WebControls.

But when i tried to run the application i get an error which has something to do with the configuration manager section. the code where it errors is in the SurveyFactory.cs file & the code is:  

namespace Votations.NSurvey.DALFactory
{
    using System;
    using System.Collections.Specialized;
    using System.Configuration;
    using System.Reflection;
    using Votations.NSurvey.IDAL;

    /// <summary>
    /// Factory implementaion for the survey DAL object
    /// </summary>
    public class SurveyFactory
    {
        public static ISurvey Create()
        {
            NameValueCollection config = (NameValueCollection) ConfigurationManager.GetSection("nSurveySettings");
            if (config == null)
            {
                config = ConfigurationManager.AppSettings;
            }
            string assemblyString = config["WebDAL"];
            string typeName = assemblyString + ".Survey";
            return (ISurvey) Assembly.Load(assemblyString).CreateInstance(typeName);
        }
    }
}

 

The assemblyString outputs a null value to cause the error but i traced the issue back to the:

NameValueCollection config = (NameValueCollection) ConfigurationManager.GetSection("nSurveySettings");

Line of code. I don't seem to have a configuration manager setup so i'm wondering how do i get the code for a survey that i created into a seperate asp.net application/site?

Regards, Shuja


 

 

 
New Post
1/31/2011 2:08 PM
 

Does anyone know whether a survey created in the Survey Project can be used as a stand-alone survey in another asp.net application/website?

 
New Post
1/31/2011 11:30 PM
 


Hello dabooj,

Options to integrate surveys created with the Survey tool with another website or webapplication:

1. IFrame option: create a survey in the Survey tool, link the surveypage to the other website through an Iframe. Least technical and fastest solution although you need to install two different websites (a. Survey; b. other site).

2. For all other solutions it's important to realise that surveys created through the Survey tool depend on the Survey database and all Survey webfiles (ascx, aspx, dll's, xml etc.) and directories.
Code copied accross from the "Asp.net code" screen to an aspx page of another site will not work.

It's possible to fully integrate Survey into another webapplication. For this you need to rebuild Survey and make it part of the other websolution. Technically this quite complicated.

3. DNN integration: it's possible to combine the Survey installation with a DotNetNuke installation within one hosting account.
For this your hostingaccount needs to have the option to create subdomains.

Setup
- Maindomain: e.g. dotnetnukes.nl --> install DotNetNuke application in rootdirectory and link the application to a Mssql database
- Create a subdomain: e.g. survey.dotnetnukes.nl --> go to subdirectory Survey of rootdirectory --> install Survey application + run sql scripts on DNN database

You now have two websites each with a separate url but sharing one database and running from one hosting account. Technically this is not the most elegant solution but it works. To show the surveys created with the Survey tool on the DNN website you would once again need the Iframe module. Final note on this option: you may have to change some settings to avoid conflicting web.config files.

Any other sugestions or technical solutions are most welcome off course. Please check some of the other postings as well.

 

 
New Post
2/2/2011 7:57 PM
 

Thanks for your response.

My next question is: do you have some kind of database/schema diagram for the tables that are listed under the NSurvey database? The list of tables makes it complictaed to see how they all work so i was wondering whether your have a diagram that you can share with me? The reason i ask this is that i will need to extract the answers for surveys by users into reports & need to know which tables holds which data.

Also, when i run the NSurvey application, it states that after creating a survey you can go into the "user" section & change your password BUT i don't see that "User" option available to me at any stage. Can you please clarify where this "user" section is & how i can change the password?

Regards,

Shuja

 
New Post
2/2/2011 11:55 PM
 

Hello Shuja,

Concerning the database schema please check this link: http://survey.codeplex.com/documentation to download the Survey 1.2.2 db diagram.

Concerning the user setting, go to: users - Users Manager - select the admin account, next change any of the settings including password.

We will publish a query soon to extract survey answers from the tables, please keep an eye on this site.
 

 
Previous
 
Next
HomeHomeSurvey Project ...Survey Project ...GeneralGeneralHow do i implement a survey created in the "survey project" engine in a seperate asp.net web site?How do i implement a survey created in the "survey project" engine in a seperate asp.net web site?