query database, create control, display on page

L

LU

1)I query database:
QuestionName | QuestionType
AwardText1 | TextBox
AwardMonth1 | DropDown
AwardYear1 | DropDown
AwardText2 | TextBox
AwardMonth2 | DropDown
AwardYear2 | DropDown
What is the best way to 'look' at QuestionType, build the correct control,
and have control over the display of the controls on the page? I want to
display 3 per line, and in a certain order.
Thanks
 
S

Steve C. Orr [MVP, MCSD]

I'd suggest using the Table web control to structure your controls together.
 
L

LU

I have questions table
QuestionName | QuestionType | Group_Order
AwardText1 | TextBox | 1
AwardMonth1 | DropDown |2
AwardYear1 | DropDown |3
AwardText2 | TextBox |4
AwardMonth2 | DropDown |5
AwardYear2 | DropDown |6
I have a questions details table.
QuestionName | QuestionDetail | OrderNumber
AwardMonth1 | June | 1
AwardMonth1 | July | 2
AwardYear1 | 2001 | 1
AwardYear1 | 2002 |2
I'm trying to create the web control based on the Question table and based
on the control dropdown/radio/checkbox it will query details table and create
the web control options.
I was trying to query questions database, loop through each record, create
the control, if it is a dropdown/checkbox/radio, query details database and
create the options for these controls.
Will this work?
Is there an easier way to get this done?
Should I pull both tables into datasets, loop through questions tbl and
filter the other?
Trying to move from asp to asp.net.
thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top