Page 1 of 2 12 LastLast
Results 1 to 40 of 67

Thread: need an adivse

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    need an adivse

    i want to build a website like the following one http://freeonlinesurveys.com/

    so is there any same readymade script or code to use it

    or some things that i can develop it to be like that or i should start from zero ??

    Best Regards

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: need an adivse

    This might be a place to start.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    What's that link supposed to be?

    If you want to look for a readymade script, look at www.411asp.net who have categories/listings of scripts.

    If you want to do this yourself, you'll need to learn a bit about databases, ADO.NET and of course ASP.NET.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    Dear mendhak the link is an online survey site , according to your answer i should start buliding one by myself ..

    i need an editor like in the picture from wher i can get to include it ?
    Attached Images Attached Images  

  5. #5
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092

    Re: need an adivse

    I'm a big fan of tinyMCE but there are lots of javascript Text editors out there.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    Regarding the database any body could give some hints especialy for the questionner table ..

    also when the end user hit the lunch buton to lunch his survey , i need to lucnh for him a link that he can distribute by email how i can do that ?


    thanks very much for your help

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    When you've saved the survey to the database, you will have a ROW ID. That ROW ID can serve as the ID of the survey. So you might have a surveypage.aspx and you can pass it

    www.example.com/surveypage.aspx?surveyid=9219

    The user can distribute that via email.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    ok , but that link how i can let it appear to the end user for example let's say that i have the follwoing :

    click here to generate an email link now when the user click on the prev link i need to generate to him ( appear to him ) thje link which will distributed ? how i can do that ?

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    After creating the survey, you will have an ID from your database. If you don't, you should modify your stored procedure to return the ID of the newly created survey. You can store that ID, say, in a session variable. Pass that along to the page that generates the emails and use it in the body of the email.

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    thanks for your help ..

  11. #11
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    Problem solved? Add resolved. If not, ask more questions

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    • should i put Question and answer in one table or sepreated ?
    • the ID if i put it Auto Increment , it will make a problem later on ?



    In the database i'll expalin my Question in the following senario

    let's say that three people make thire survey , gnerated the link and they send it by email ,

    • now should i make databese for every user alone so can everyone has his result , or how i can connect the user who made survey with his own result. so when he access his control area he can see the result for his own survey ..



    Senario 2:

    while user making his survey at first it show for him a dropdown list he will choose from it the type of survey that he want let say for example he choose yes/no

    • now i need after he made his choice to apper to him the editor to put his Questions , how i can make the editor hide until he choose the type of survey from the dropdown list ?
    • after that he'll go to next page to put the answers for the questions , here my question is after he choose the survey type and puting the his Q A how i can generate page that has Q and the radio button ( yes/No) under each question ?

  13. #13
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    Separate the questions and answers. Each set of entries by an end user will correspond to questions which means that you'll have to have a foreign key reference.

    No, the autoincrement won't cause a problem.

    Obviously, don't make a new database for each user. It'll just be separate rows in the same table, differentiated by the User ID.



    To hide a control you simply set its Visible property to false (either through codebehind or javascript). When the user selects an option you can make it visible using codebehind or javascript.

    To generate a series of questions, use a repeater. For each question in the dataset, the repeater will render out one row, which is where you'd need to define the look and feel of the question in an ItemTemplate.

    I strongly suggest that you get the database design nailed down first, else you'll face problems later.

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    how i can separate rows in the same table ?

    i'll design the database and come back post it here so you can give me your opinion

  15. #15
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    Yeah, that'd be a better idea - show us the database design and then your question of how or whether you should separate the 'rows' or not can be answered.

  16. #16

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    kindly find the link below for the database

    http://rapidshare.com/files/18625244...eydatabase.zip


    waiting for your reply..


    Regards

  17. #17
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    Er... I was hoping for a database diagram, not the entire database

    I don't have SQL Server on this machine. Didn't you make a drawing with some boxes at any point? You know... with column names and the likes...

  18. #18

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    well , i already made flow chart for the database by visio i'll put it today

  19. #19

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    also i'll put a photo for the database from sql server

  20. #20
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    That would be helpful and kind of you

    (And of course the right way to start)

  21. #21

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    kindly find below the link for database

    rapidshare.com/files/187872236/DataBase_Photo.zip.html

    Regards

  22. #22
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    Right, that's good. Still some changes you need to make though.

    A survey can consist of multiple questions. Therefore, you should not have a 'question' row in the survey table. Make a new table just for questions. Each question should obviously have a QuestionId (auto increment) and be associated with a survey ID.

    I assume 'type' means that it is either a Y/N or T/F or Written answer type question. Yes? I believe the type should also be stored against the question row rather than the survey itself. Think about it - would a survey consist of a series of questions of all types or just one type?

    All surveys I see have multiple types, so this 'type' field should really be against the question itself.

    Now that you have the questions in place, you need the potential answers against each question.

    I'm assuming that's what the bottom 3 tables are, but of course, again, they should be against each question.

    Finally, each user will select a survey and select answers in that survey. You will need another table that holds the userid against questionids along with answerIDs selected.

  23. #23
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    You also had a question about foreign keys incrementing? Not sure what you meant, but only the primary key in those tables should be made to increment. The foreign keys are simply constraints that say "If ID 92 exists in the parent table, then and only then will I allow the value 92 in this field in this child table."

  24. #24

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    kindly could you plz give me a simple design for the changes

  25. #25

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    Type meant that it is either a Y/N or T/F or Written answer , its the type of answer for the question , user will choose the type for each question
    Last edited by alqous; Jan 23rd, 2009 at 08:07 AM.

  26. #26

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    kindly find the attached for the changes..

    Finally, each user will select a survey and select answers in that survey. You will need another table that holds the userid against questionids along with answerIDs selected.
    did you mean i should make a table lets say it's name Result and consist from following rows ?

    • ResultID
    • UserID
    • QuestionID
    • WID
    • TFID
    • YNID



    i really appreciate your help and i dont know how i should thank you for helping me ..

    waiting for your reply


    Regards
    Attached Files Attached Files
    Last edited by alqous; Jan 24th, 2009 at 12:22 AM.

  27. #27
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    The Question table needs to know what type of a question it is linking to. Currently, the question table has no idea. This means that if you ask for QuestionID 29, your SQL query will have to look at at all three tables to find out where it is... that's inefficient. You will need to create a table with two columns - AnswerTypeId and AnswerTypeName. The values will be

    1 - Written
    2 - YesNo
    3 - TrueFalse

    Then, against each question, have an AnswerTypeId.

    QuestionId = 29, Question = "Are you a pineapple?" AnswerTypeId = 2, SID = 8.

    This way, when you see that AnswerTypeId = 2, you will look at the YesNo table, because you know that 2 is "YesNo".

  28. #28
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    OK, I need to add more comments - you don't have a way of specifying multiple choice questions.

    I realize that I am not giving you a straight answer, I am only giving you pointers, this is because these skills that you will struggle with now will help you later when you work on a new project and help you realize how important database design is in any project. It's the foundation of your application and has to be done right.

  29. #29

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    I change it , kindly find the link below , i hope it's complete now and there is no mistake :

    http://rapidshare.com/files/189415755/DB.zip.html

    witing for your reply

    thank you my friend
    Last edited by alqous; Jan 27th, 2009 at 11:17 AM.

  30. #30
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    OK, unless I've overlooked something, that looks fine.

    You should start coding against it now, if you face problems, you can always go back and change the schema, but the changes should be easy enough at this point.

  31. #31

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    ok , i'll start coding against it now and if i faceany problem that i can't solve it i'll come back asking for your help..


    Thanks my friend

    TC

  32. #32
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    No problem, let us know of your progress as you go along.

  33. #33

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    thanx , i knew it's take long time but finally i strat coding against it

    when user creating his survey how i can spreate the row in the same table , cuz i dosent make sense to put every q i a row

  34. #34
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    It does make sense to have every question in a row. That's called the one to many relationship. One survey has many questions. One question has many answers.

    You just need to make sure that a SurveyId has a relationship with several QuestionIds.

  35. #35

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    how i should do that (SurveyId has a relationship with several QuestionIds) ?

  36. #36
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    In the Questions table, have a column called SurveyId which has a foreign key reference to SurveyId in the survey table. Make sure it's not unique. This way, you have set up a one-to-many relationship between the Survey table and the Questions table.

  37. #37

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    ok , i'll do it and feed you back

  38. #38
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: need an adivse

    Thanks, I am quite hungry.

  39. #39

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    sorry if i used a wrong Expression , i'll come back soon

  40. #40

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    130

    Re: need an adivse

    i faced something , after the user put hi info to register and hit the save button everything is ok and the info stored in the database , but if he make a refresh for the page the info dublicated how i can prevent that ?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width