Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL
Hello, I have a table in SQL with 3 types of surveys but the number of questions could be change, I meant today could be 10, tomorrow 11, the answers that the user can select was: 1 or 0 (RadioButton).
How could I create the Labels to show the questions? I hope you can help me please.
I cant find any information!
 
Regards
Posted 22-Mar-13 15:04pm
Comments
ThePhantomUpvoter at 22-Mar-13 20:29pm
   
If you are asking what I think you are asking, "How could I create the Labels" the answer is "dynamically" for WinForms/WPF or repeater for ASP.
miriameu_gp at 25-Mar-13 15:12pm
   
I meant that depending on the dropdownlist selected display a table but with choice of select YES or NO (radiobutton) and be kept for a row in the database like this:
 
if dropdownlist option 1 was selected:
1.- Question one (option1)? °YES °no
2.- Question two (option1)? °YES °No
....
 
if dropdownlist option 2 was selected:
1.- Question one (option2)? °YES °no
2.- Question two (option2)? °YES °No
....
 
SAVE
 
NOte: Questions could be change, because there are a table of Questions in the database
Sergey Alexandrovich Kryukov at 22-Mar-13 23:08pm
   
"Select 1 or 0" means the use of a check box, not a radio button. If this is a "multiple choice question" (which should go to hell as soon as possible), a radio button is used. The problem of "label" is artificial: this could be a question itself, or a special "label" data element...
—SA
miriameu_gp at 25-Mar-13 15:10pm
   
I meant that depending on the dropdownlist selected display a table but with choice of select YES or NO (radiobutton) and be kept for a row in the database like this:
 
if dropdownlist option 1 was selected:
1.- Question one (option1)? °YES °no
2.- Question two (option1)? °YES °No
....
 
if dropdownlist option 2 was selected:
1.- Question one (option2)? °YES °no
2.- Question two (option2)? °YES °No
....
 
SAVE
 
NOte: Questions could be change, because there are a table of Questions in the database

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 269
1 OriginalGriff 180
2 DamithSL 180
3 Peter Leow 125
4 Kornfeld Eliyahu Peter 95
0 OriginalGriff 7,355
1 DamithSL 5,254
2 Sergey Alexandrovich Kryukov 4,942
3 Maciej Los 4,906
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100