Implementation Report

Lab 09: Online Survey System


Overview

A role-based Online Survey System built with ASP.NET Web Forms and VB.NET. Three roles: Survey Builder, Surveyor, and Survey Administrator each has a dedicated interface through session-based authorization. Builders can create surveys and add MCQ or True/False questions, Surveyors attempt active surveys, the Administrator can manages users, control survey visibility, set surveyor anonymous, and views results.

HTML, ASPX & VB Code

IAD Lab 09 Code.pdf

Database Schema

TableKey ColumnsPurpose
Users UserID, Name, Email, Password, Role, IsAnonymous All users with role and anonymity flag, which is set by Admin.
Surveys SurveyID, Title, CreatedBy, IsActive Survey records, Admin can activate or deactivate.
Questions QuestionID, SurveyID, QuestionText, QuestionType MCQ or TrueFalse questions belonging to a survey.
Options OptionID, QuestionID, OptionText 4 options for MCQ, True/False auto-inserted for T/F questions.
Responses ResponseID, SurveyID, UserID, QuestionID, SelectedOptionID, SubmittedAt Surveyor answers, UserID is NULL for anonymous surveyors.

Test Cases

#Test CaseOutput
1For invalid credentials"Invalid Email or Password" is shown
2When surveyor accesses Admin URLIs Redirected to Login.aspx
3When builder adds MCQ questionQuestion + 4 options are saved, confirmation is shown
4If builder adds True/False questionTrue and False options are auto-inserted
5When No active surveysSurveyor will see "No surveys available."
6When surveyor submits responsesResponses are saved and result summary is shown
7When anonymous surveyor submitsResponse is saved with NULL UserID
8If Admin deactivates surveySurvey is removed from Surveyor's active list
9If admin tries to delete his own accountThen "You cannot delete your own account." is dispayed

Technical Details

Uses ADO.NET sqlConnection, sqlcommand and data reader with the connection string from ConfigurationManager.ConnectionStrings("Survey_DB").


Session("UserID"), Session("Role"), and Session("IsAnonymous") are set on login and checked on every protected page's Page_Load. The add questions page uses AutoPostBack on the question type dropdown to show/hide the mcq options panel, and OUTPUT INSERTED.QuestionID to immediately get the new question's ID for option insertion.


Back
Web hosting by Somee.com