Home All Groups Group Topic Archive Search About

query database, create control, display on page

Author
26 Mar 2005 10:43 PM
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

Author
27 Mar 2005 7:50 AM
Steve C. Orr [MVP, MCSD]
I'd suggest using the Table web control to structure your controls together.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



Show quote
"LU" <L*@discussions.microsoft.com> wrote in message
news:B78AC8B4-B618-446E-8177-F73CAF83C44C@microsoft.com...
> 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
>
>
>
Author
28 Mar 2005 12:29 AM
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

Show quote
"Steve C. Orr [MVP, MCSD]" wrote:

> I'd suggest using the Table web control to structure your controls together.
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
>
> "LU" <L*@discussions.microsoft.com> wrote in message
> news:B78AC8B4-B618-446E-8177-F73CAF83C44C@microsoft.com...
> > 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
> >
> >
> >
>
>
>

AddThis Social Bookmark Button