Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Web based Test in ASP

Posted on 2012-09-09
Medium Priority
Last Modified: 2012-10-02
Team -

I am looking for examples / demo codes for Web based tests in asp. I have googled alot & found alot of websites like planet-source-codes, hotscripts etc., bt i couldnt find anything which i am looking for.

what i want is,

Web based test. Admin should be able to create tests, set time limit & also can assign to users.
Users need to finish the test within time.

can anyone send me a demo codes for the same pls.

Question by:davidi1
  • 3
  • 3
  • 2
LVL 31

Expert Comment

by:Wayne Barron
ID: 38380643
(I assume you are using ASP Classic, since you Zoned it for that, if you are using ASP.NET, just replace it with the information below when answering, however, I will be unable to assist in the .NET area, as I am a Classic ASP Developer)
What is your ASP Classic skill level =
SQL Server =
JQuery / AJAX =

I would not design a script like this with Access Database, I would use SQL Server.
Use JQuery for the time limit, as well as other functions within the site.

There are all sorts of possibilities on doing this.
I am currently working on one similar to this as well.
It is not really that hard, though I have had to stop to work on other projects,
Hoping to jump back into it within the next week.

I can give you some pointers, if you can answer the questions above.
However, there are some scripts called: School Scripts, but they are old, and the coding really sucks, and I would hate to dig them up again, as they were made around 1999-2001, and trust me when I say, you do not want to learn for that type of crap coding.


Author Comment

ID: 38380662
@CarzKiss - you've helped me alot for my previous posts..,

Yes. I am looking for Classic ASP only.

What is your ASP Classic skill level = Intermediate
SQL Server = Intermediate
JQuery / AJAX = Beginner.

I am using SQL Server.

What i have done so far is,

I have created a table called "Test_Main" with the following fields,

CREATE TABLE [dbo].[Test_Main](
      [TestID] [numeric](18, 0) IDENTITY(5000,1) NOT NULL,
      [SubmitterNT] [varchar](255) NULL,
      [SubmitterName] [varchar](255) NULL,
      [SubmitDate] [smalldatetime] NULL,
      [SubmitProcess] [varchar](255) NULL,
      [SubmitSubProcess] [varchar](255) NULL,
      [TestName] [varchar](255) NULL,
      [TestCategory] [varchar](255) NULL,
      [TestLevel] [varchar](255) NULL,
      [MaxQuestions] [varchar](255) NULL,
      [EachQuestionScore] [varchar](255) NULL,
      [Timelimit] [varchar](255) NULL,
      [TestStatus] [varchar](255) NULL


In the above table, user inputs "all except EachQuestionScore as its calculated based on "100/MaxQuestions"

so a Test is created. Then I am asking the user to create questionarie for the same.

query as follows:

CREATE TABLE [dbo].[Test_Details](
      [QuestionID] [numeric](18, 0) IDENTITY(1000,1) NOT NULL,
      [TestID] [numeric](18, 0) NULL,
      [Question] [text] NULL,
      [Answer1] [varchar](255) NULL,
      [Answer2] [varchar](255) NULL,
      [Answer3] [varchar](255) NULL,
      [Answer4] [varchar](255) NULL,
      [Answer5] [varchar](255) NULL,
      [CorrectAnswer] [varchar](255) NULL


I am able to add questions also.., However what i want to do is, i want to display all questions in 1 page(which i can still do in classic asp). But i dont know how to capture and save those inputs in sql as the table is dynamic. and also the catch here is, once the time limit is over, test should finish and marks to be graded for the questions attended.

please help
LVL 31

Expert Comment

by:Wayne Barron
ID: 38380684
I will have to think on this one, no sleep as of yet, so, brain is not functioning properly right now....
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 38380697
I have also started to work on a project like this.  I can tell you this can be one of those things that sounds easy at first until you get into it becomes pretty complex.

First with timing, you can do this server side with vbscript.  The advantage is it can not be manipulated by the savy test taker.  However, this eats up your cpu time.  Javascript/jquery timer will not do this but could potentially be manipulated by the user.   Part of your decision making

At the very least, your timing code will look like below  http://jsfiddle.net/RCm8m/
<div id="question1">testing....1..2...3</div>¿
<script>setTimeout(function() {
}, 1000); //¿¿¿¿¿</script>

Open in new window

Of course enhancements will include a timer, showing the next question etc.    As far as the Admin authoring questions and setting answers and time limits for each question that is simply updating/adding data in one area and displaying data in the test area.  

<div id="<%=qID%>"><%=question%></div>¿
<script>setTimeout(function() {
}, 1000); //¿¿¿¿¿</script>

Open in new window

Although I would say using ajax to rotate the questions would better although add a little more complexity.  

Take a look at how this site works, http://smarterer.com/.  Their process is cool.  Unfortunately, they use crowd sourced questions and answers that I found wrong.  It is a good exercise to see what you like and don't like.

Author Comment

ID: 38387167
@CarrzKiss - any updates on this?
LVL 31

Expert Comment

by:Wayne Barron
ID: 38389026
I am so sorry David, I am completely tied up with some issues on our mail server and one of our sites.

@padas, can you assist David further with his issue?

Author Comment

ID: 38403030
@padas - any updates?
LVL 54

Accepted Solution

Scott Fell,  EE MVE earned 1500 total points
ID: 38403111
I'm not really sure exactly what you are looking for.  I don't think there is any open source classic asp projects like this.  Take a look at some other examples.  Like I said before, this is a bigger project then you may have thought.  

Create test, set limits, assign users - this is nothing more then inserting records to your db
INSERT INTO tblQuestions (qNumber, qTitle, qDescription, arrChoices, qAnswer, TimeLimit, arrUsers, ,...)
VALUES (value1, value2, value3,...)

Open in new window

Where arrChoices data might look like: a)choice 1[-]b)choice 2[-]c)choice 3.
Then when you want to display choices:
for each x in Choices
    response.write x &"<br>"

Open in new window

You will use javascript to time the question as I have shown above.

Take a look at the examples I have given you, decide what you like and don't like and start jotting down a flow chart for yourself to see the big picture.  Then you can start coding each piece of the  puzzle.  But the very basics I have just posted here.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question